Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

express js

const express = require("express")
const app = express();


// GET method route
app.get('/', function (req, res) {
    res.send('GET request to the homepage');
  });
  
  // POST method route
  app.post('/', function (req, res) {
    res.send('POST request to the homepage');
  });
  

app.listen(3000,()=>{
    console.log("this App is running on port 3000")
})
Source by expressjs.com #
 
PREVIOUS NEXT
Tagged: #express #js
ADD COMMENT
Topic
Name
3+5 =