Инструкция:
-command to create package.json file

- npm install pg - Installing a library for working with the postgresql database
- npm install express - Installing a library to work with the server part



- npm install --save-dev nodemon - Installing a library to update the server in real time
--setting up package.json--
--started structure--
//creating express application
//connecting express module
const express = require('express')
const app = express()
//we register the port
const PORT = 3001
app.get('/', (req, res) => {
res.send('test quer')
})
//server startup and feedback output
app.listen(PORT, () => {
console.log('Server start')
})
-command to create package.json file

- npm install pg - Installing a library for working with the postgresql database
- npm install express - Installing a library to work with the server part



- npm install --save-dev nodemon - Installing a library to update the server in real time
--setting up package.json--
--started structure--
//creating express application
//connecting express module
const express = require('express')
const app = express()
//we register the port
const PORT = 3001
app.get('/', (req, res) => {
res.send('test quer')
})
//server startup and feedback output
app.listen(PORT, () => {
console.log('Server start')
})
Вложения
Последнее редактирование: