dmonti / node-pg-socket-example

Node + PostgreSQL + Socket.IO examples

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

node-pg-socket-example

Node + PostgreSQL + Socket.IO examples

Install nodemon and start the app:

> cd <path>/node-pg-socket-example
> npm install
> npm install -g nodemon
> nodemon
[nodemon] 2.0.6
[nodemon] to restart at any time, enter `rs`
[nodemon] watching path(s): *.*
[nodemon] watching extensions: js,mjs,json
[nodemon] starting `node index.js`
listening on *:3000

Then open your browser at: http://localhost:3000

To see server info: http://localhost:3000/info

For database connection, you must configure the .env file.

More info to how configure the database URL:

https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNSTRING

All done!

About

Node + PostgreSQL + Socket.IO examples


Languages

Language:JavaScript 54.7%Language:HTML 39.8%Language:Dockerfile 4.0%Language:Shell 1.5%