how to make an express server
// this is your code
// ZDev1#4511 on discord if you want more help!
// first you should install express in the terminal
// `npm i express`.
const express = require('express');
const app = express();
// route
app.get('/', (req,res)=>{
// Sending This is the home page! in the page
res.send('This is the home page!');
});
// Listening to the port
let PORT = 3000;
app.listen(PORT)
// FINISH!
Also in JavaScript:
- how to check the listeners on an object js
- javascript html encode
- free JSON hosting
- queryselector change alternative
- ModuleBuildError: Module build failed (from ./node_modules/sass-loader/lib/loader.js): Error: ENOENT: no such file or directory, scandir
- jquery ajax form submission
- how to read environment variable in node js
- javascript select element with two classes
- check if number appears odd number of times in array javascript
- how to put firebase config in a sperate file react native
- angular multiple validator pattern single input
- jquery each has class
- compare two dates using moment
- how to sent react from data in mongodb
- javascript generate unique id
- react scrolling a div by dragging the mouse?
- javascript auto scroll on bottom
- javascript recursive fibonacci
- Given a string S and a character C, return an array of integers representing the shortest distance from the character C in the string. javascript
- javascript modal show
- javascript exeit from loop
- javascript append list
- Remove Duplicate objects from JSON
- jquery get parameter from url