This is my first REST API for React js App.
$ npm install
const express = require('express');
const colors = require('colors');
const dotenv = require('dotenv').config();
// init environment variable
const PORT = process.env.PORT || 8080;
//express inti
const app = express();
//express middlewares
app.use(express.json());
app.use(express.urlencoded({extended : false}) );
//listen port
app.listen(PORT, () => {
console.log(`server is running on port ${PORT}`.bgGreen.black);
});
- Express Js
- Nodemon
- Colors
- dotenv
- multer
- nodemailer