Node Express Mongo is a scaffolding or template to get started with a new Node Express project with Mongo DB connectivity using mongoose package. It also provides basic user authentication APIs and also demonstrates the use of persistence DB layer. The code linter and code formatter is also there for development environment.
You should have at least a basic understanding of fundamental programming concepts and some experience with introductory Javascript
. And the knowledge of Mongo
, Express
and Node JS
is an advantage.
Lastly, make sure you have the following installed.
- Latest version of Node.js
- Latest version of NPM (Node Package Manage)
- Latest version of MongoDB
- Latest version of git (This is optional. It requires only if you choose to clone project)
-
Either you can clone or download repository from GitHub.
-
Navigate to project directory in the terminal or command prompt.
cd node-express-mongo
-
Install project dependencies
Note: we're using yarn, if you don't want to use it replace
yarn
withnpm
.yarn install
-
Create a
keys.js
file inconfig
directory-
If you are using Windows
Command Prompt
orPowershell
copy config/keys.sample.js config/keys.js
-
If you using
Mac
orLinux
cp config/keys.sample.js config/keys.js
Note: update
keys.js
file variables as per the requirements. -
-
Run the project server
-
Run development server
yarn start
-
Run production server
yarn run start-prod
-
-
Project server is running at:
- The server is running at http://localhost:8000
- Fork it ( https://github.com/vishalnagda1/node-express-mongo/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new pull request.