Node JS, настройка окружения.

ivan_

Новичок
Пользователь
Май 4, 2025
3
0
1
Инструкция:
-command to create package.json file
1746364775842.png
- npm install pg - Installing a library for working with the postgresql database
- npm install express - Installing a library to work with the server part
1746365069261.png
1746365076427.png
1746365177878.png
- 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')
})
 

Вложения

  • NOde.pdf
    938,7 КБ · Просмотры: 2
  • PG.pdf
    573 КБ · Просмотры: 2
  • 1746364696729.png
    1746364696729.png
    25,7 КБ · Просмотры: 2
  • 1746365326582.png
    1746365326582.png
    83,6 КБ · Просмотры: 2
  • 1746365482773.png
    1746365482773.png
    13,6 КБ · Просмотры: 2
  • 1746365563812.png
    1746365563812.png
    12,9 КБ · Просмотры: 1
Последнее редактирование:

ivan_

Новичок
Пользователь
Май 4, 2025
3
0
1
--started structure--
1746365591330.png

--advanced structure--
1746368654259.png
controllers - used to write logic
models - to work with the database
Routers - to specify routes

-creating a database
1746369276538.png

Setting up a database connection
1746369387209.png
1746369473637.png


---examples
1746369579714.png
1746369616295.png

app.js settings
1746370062273.png
 
Последнее редактирование:

ivan_

Новичок
Пользователь
Май 4, 2025
3
0
1
--insomnia setup--
1746366049051.png
1746366071286.png
1746366115515.png
1746366168385.png
1746366618341.png
1746366767172.png
 
Последнее редактирование:

Форум IT Специалистов