What do you want to save?
Add Code snippet
New code examples
-
Javascript 2021-09-23 01:45:03
create server and connect to db and frontend
// create directory //npm init -y //npm i express --save //npm i mysql --save //create public directory //create server.js // <---- In the server js file ---> 'use strict'; const express = require('express'); const app = express(); app.use(expre... Add solution -
Javascript 2021-09-17 15:24:03
app use body parser
var express = require('express') var app = express() app.use(express.json()) // for parsing application/json app.use(express.urlencoded({ extended: true })) // for parsing application/x-www-form-urlencoded app.post('/profile', function (req, res, next)... Add solution -
Other 2021-09-04 12:01:02
bodyparser is deprecated
The package bodyParser is deprecated. You will get this warning with these lines of code: app.use(bodyparser.json()); app.use(bodyParser.urlencoded({extended: true})); If you are using Express 4.16+ you can now replace those lines with: app.use(expres... Add solution
Best helpers
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5