Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

express server template

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

app.use(express.json());

app.get("/", (req, res) => {
  res.send("Hello");
});

app.listen(port, () => {
  console.log(`Server running on http://localhost:${port}`);
});
Comment

express start template

const express = require('express');
const app = express();
const cors = require('cors');
const port = 4000;
app.use(cors());
app.use(express.json());

app.get("/", (req, res) => {
  res.send("Hello");
});

app.listen(port, () => {
  console.log(`Server running on http://localhost:${port}`);
});
Comment

PREVIOUS NEXT
Code Example
Javascript :: pluck javascript 
Javascript :: classlist add js to add more than one class 
Javascript :: drupal 8 render node programmatically 
Javascript :: find the key of a value in array js 
Javascript :: how to get an even number in javascript 
Javascript :: uppercase and lowercase letters in js 
Javascript :: disable radio button javascript 
Javascript :: limitar la cantidad de decimales en javascript 
Javascript :: javascript prepend string to array 
Javascript :: how to push a file to github 
Javascript :: template literal syntax not working 
Javascript :: gms2 get array length 
Javascript :: check if the data can be parsed javascript 
Javascript :: vim total number of lines 
Javascript :: how to create uuid in javascript 
Javascript :: if typeof variable javascript 
Javascript :: How can I refresh a page with jQuery 
Javascript :: vuejs send required props to dynamic component 
Javascript :: javascript redirect to another page 
Javascript :: js redirect code 
Javascript :: html call javascript variable 
Javascript :: if variable does not exist javascript 
Javascript :: multiple connections to mongoose 
Javascript :: how to access model data in jsp spring mvc 
Javascript :: Days remaining using moment 
Javascript :: angular timestamp 
Javascript :: nth value of the Fibonacci sequence in js 
Javascript :: pass data navigate react router dom 
Javascript :: javascript rupiah format 
Javascript :: between in mongodb 
ADD CONTENT
Topic
Content
Source link
Name
9+2 =