Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

# node-express
Detail explanations


mkdir projectname
cd into that folder 
then install express into that folder using following command
npm install express
to run the program just type node app.js

then create 2 files 
app.js
index.html

app.js :
const express = require('express')
const app = express()
app.get('/', function(req, res){
    res.sendFile(__dirname+"/index.html")
})
app.listen(3000, function(){
    console.log('Server is started on port 3000');
})

index.html file:
normal html code

About

Details explanations

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages