This program is an example of a CRUD application using the MEAN stack. This project was modified from the original code provided in this article: MEAN Stack (Angular 5) CRUD Web Application Example by Didin J. The GitHub repo for his project can be found here.
- MongoDB v3.6.2 (Mongoose v5.0.3)
- Express v4.16.2
- Angular v5.2.3
- Node.js v9.5.0
- Clone this repo
git clone https://github.com/stanleyeosakul/mean-crud-example.git
cd
into the folder of the cloned repo- Run
yarn install
to install dependencies - Configure your keys file
config/keys.js
-
From the root directory, create the keys file
touch config/keys.js
-
Enter your mongoURI for
MongoDB
intokeys.js
module.exports = { mongoURI: '<your-mongodb-url-goes-here>', };
-
- Start your local MongoDB instance
- Choose to run the development or production server
- Development
- Front End (Angular)
- Run
ng serve
, and navigate tohttp://localhost:4200/
.
- Run
- Back End (MongoDB, Express, Node.js)
- Run
yarn run dev
, and navigate tohttp://localhost:3000/
.
- Run
- Front End (Angular)
- Production
- Run
yarn run build
, and navigate tohttp://localhost:3000/
.
- Run
- Development
yarn run dev
- Builds the Angular project without build optimization into the
dist/
folder - Runs the
server.js
node app
- Builds the Angular project without build optimization into the
yarn run build
- Builds the Angular project into the
dist/
folder - Runs the
server.js
node app
- Builds the Angular project into the