Skip to content

arnabmunshi/node-express-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NODE.JS Express API

Adding 'type': 'module' to the package.json enables ES 6 modules.
When you have 'type': 'module' in the package.json file, your source code should use import syntax. When you do not have, you should use require syntax.

Create a .env file and add the following code:
PORT=8000
DBURI=mongodb+srv://arnabmunshi:<password>@nodejs.1vdau.mongodb.net/<dbname>?retryWrites=true&w=majority