What do you want to save?
Add Code snippet
New code examples
-
Javascript 2021-11-13 20:56:10
create server with express js
// npm init // npm i express const express = require('express'); const server = express(); const PORT = 3000; // Body parser server.use(express.json()); // Homme page server.get('/', (req, res) => { return res.send("<h1 style='text-align:... Add solution -
Javascript 2021-11-12 14:32:19
use node js as backend with angular frontend
1. Create a folder: mkdir project-name 2. Enter in the folder: cd project-name 3. Install Angular (you must have npm): npm install -g @angular/cli 4. Create Angular project: ng new frontend 5. Create server folder: mkdir server 6. Enter in the folder: cd ... Add solution -
-
Javascript 2021-11-09 06:03:13
sample express app
//to run : node filename.js const express = require('express') const app = express() const port = 3000 app.get('/', (req, res) => res.send('Hello World!')) app.listen(port, () => console.log(`Example app listening at http://localhost:${port}`)) /... Add solution -
Javascript 2021-11-04 21:23:13
express hello world example
//to run : node filename.js const express = require('express') const app = express() const port = 3000 app.get('/', (req, res) => res.send('Hello World!')) app.listen(port, () => console.log(`Example app listening at http://localhost:${port}`)) /... Add solution -
Javascript 2021-11-03 10:47:20
what is package.json in node
npm init //To install package.json Add solution -