Skip to content

codermujahid/rest-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Express Logo

Fast, unopinionated, minimalist web framework for Node.js.

Express Logo Express Logo Express Logo

REST API with Express Server

This is our first REST API for React js App.

First clone this repo and then instal its packages

$ npm install

Server structure

const express = require('express');
const colors = require('colors');
const dotenv = require('dotenv').config();

 // init environment variable
 const  PORT = process.env.port || 8080;

 // express init
 const app = express();




 // express milloewares
 app.use(express.json());
 app.use(express.urlencoded( { extended : false}));


 // listen port 
 app.listen(PORT, () => {
    console.log(`server is running on port ${PORT}`.bgWhite.black);
 });

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published