/go

Guide to Project

Primary LanguageJavaScript

Go

Guide to Project

How to create a NodeJs Project

Use the package yarn to create a NodeJs project.

yarn init -y

Tools

Express

Express includes routes bases itself in Operating System

yarn add express

Nodemon

Automatically updates the server when it detects any code changes

yarn add nodemon -D

Start a Server

yarn nodemon src/index.js

UUIDV4

Generates a unique id

yarn add uuidv4

Scripts

Before

{
  "name": "backend",
  "version": "1.0.0",
  "main": "index.js",
  "license": "MIT",
}

After

{
  "name": "backend",
  "version": "1.0.0",
  "main": "src/index.js",
  "license": "MIT",
  "scripts": {
    "dev": "nodemon"
  },
}

Start a Server

yarn dev

License

MIT