Skip to content

imran517/express-js-mongodb-async-api

Repository files navigation

express-js-mongodb-promise-api

A simple api using express.js and mongodb with async/await

Requirements

Diagram

Alt text

Components

  • config (config.js)

    • configuration file
  • server (server.js)

    • creates server and listens on a port 3000
    • defines routes and accepts requests (routes.js)
  • controller

    • handles requests
  • service (service.js)

    • handles business logic
  • model

    • data
  • dbContext (dbContext.js)

    • handles db connection
  • database (mongodb community server)

    • mongodb database

Run

Run the following command from the root directory:

node .\server.js

Tests

Try the following urls in Postman.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages