FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

bart120/pAPIs: A boilerplate for REST API Development with Node.js, Express, and MongoDB · GitHub

/ pAPIs Public
forked from blipn/pAPIs
 
 

Repository files navigation

Running API tests from docker

Run tests :

docker-compose up --exit-code-from web

Setting up environments

  1. You will find a file named .env.example on root directory of project.
  2. Create a new file by copying and pasting the file and then renaming it to just .env
    cp .env.example .env
  3. The file .env is already ignored, so you never commit your credentials.
  4. Change the values of the file to your environment. Helpful comments added to .env.example file to understand the constants.

Project structure

.
├── app.js
├── package.json
├── bin
│   └── www
├── controllers
│   ├── AuthController.js
│   └── BookController.js
├── models
│   ├── BookModel.js
│   └── UserModel.js
├── routes
│   ├── api.js
│   ├── auth.js
│   └── book.js
├── middlewares
│   ├── jwt.js
├── helpers
│   ├── apiResponse.js
│   ├── constants.js
│   ├── mailer.js
│   └── utility.js
├── test
│   ├── testConfig.js
│   ├── auth.js
│   └── book.js
└── public
    ├── index.html
    └── stylesheets
        └── style.css

How to run

Running API server locally

npm run dev

You will know server is running by checking the output of the command npm run dev

Connected to mongodb:YOUR_DB_CONNECTION_STRING
App is running ...

Press CTRL + C to stop the process.

Note: YOUR_DB_CONNECTION_STRING will be your MongoDB connection string.

License

This project is open-sourced software licensed under the MIT License. See the LICENSE file for more information.

About

A boilerplate for REST API Development with Node.js, Express, and MongoDB

Resources

Code of conduct

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages


Back | FazBrowse Home | New Git URL