- Mongo Express Angular Node (MEAN) full-stack app, integrates an Angular frontend with a Node.js backend.
- Note: to open web links in a new window use: ctrl+click on link
![GitHub last commit](https://camo.githubusercontent.com/cbd7459c186b4b813ee3472a16b63473769cf0cf3db2568d5b2229ffc6c2671a/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6173742d636f6d6d69742f416e647265774a426174656d616e2f6d65616e2d737461636b2d6170703f7374796c653d706c6173746963)
- includes signup and login forms
- user id and post details stored in MongoDB cloud Atlas database
- full Create Read Update and Delete (CRUD) database functionality
- uses the Angular canActive interface as a guard deciding if a route can be activated
- The error component is an Entry component but since 9.0.0 with Ivy, the entryComponents property is no longer necessary. See deprecations guide.
![Example screenshot](./img/login.png)
πΎ Frontend & Backend Setup
- Install dependencies using
npm i
- Backend: Add database access string to backend/app.js
CONNECTION_URL
then run nodemon server.js
to start server
- Frontend: Run
ng serve
for a dev server then navigate to http://localhost:4200/
.
- Run
ng build
to build the project. The build artifacts will be stored in the dist/
directory. Use the --prod
flag for a production build.
- extract from
error-interceptor.ts
// intercept method; attached to every outgoing http request
intercept(req: HttpRequest<any>, next: HttpHandler) {
return next.handle(req).pipe(
catchError((error: HttpErrorResponse) => {
let errorMessage = 'An unknown error occured';
if (error.error.message) {
errorMessage = error.error.message;
this.dialog.open(ErrorComponent, { data: { message: errorMessage } });
}
return throwError(error);
})
);
}
- Spinner is displayed while data loading, controlled by a boolean valuexΒΊ
- Status: Incomplete. Backend connects to database and frontend displays login page. Sign-up and Login not working. Update or replace.
- To-Do: Show add post form
- This project is licensed under the terms of the MIT license.