Skip to content

endridollani/node-rest-api-mongo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


REST API with user authentication.


Setup


  1. Install npm packages

    npm i
  2. Login or Register to MongoDb Atlas

  3. Create a cluster and copy connection string

  4. Create .env file in the project root dir and paste:

    PORT=8080
    DB_CONNECTION_STRING="your-mongodb-atlas-connection-string"
    AUTH_SECRET='your-choosen-auth-secret-keyword'
    COOKIE_NAME='your-choosen-cookie-name'
  5. Run the application

    npm run dev

Swagger


After you have completed the steps above navigate to http://localhost:8080/api-docs/#/.

Note: Modify 8080 in the url above with the PORT you specified in .env file.

You can also click the link displayed in your termial log when the app is running.

About

REST API: Node, Express, TypeScript and MongoDB with user authentication.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published