Sign inSign up

shintech/shintech-server-psql

By shintech

•Updated about 9 years ago

shintech server psql

Image
0

233

shintech/shintech-server-psql repository overview

⁠shintech-server-psql

⁠Synopsis

Node server w/psql

⁠Installation
./install.sh
⁠Usage
⁠Development
npm run watch
npm run dev
⁠Production
#Edit /etc/postgresql/9.4/main/pg_hba.conf 

local   all             postgres                                trust #peer

#######################################################################

sudo -u postgres psql -c "ALTER USER postgres PASSWORD 'postgres';"
psql -f db.sql -U postgres

#GET models
curl http://127.0.0.1:8000/api/models

#GET models/:id
curl http://127.0.0.1:8000/api/models/:id

#POST models
curl -H "Content-Type: application/json" -X POST -d '{ "name":"killbill", "attribute":1 }' http://127.0.0.1:8000/api/models

#PUT models
curl -H "Content-Type: application/json" -X PUT -d '{ "name":"Kill Bill" }' http://127.0.0.1:8000/api/models/2

#DELETE models
curl -X DELETE http://127.0.0.1:8000/api/models/1

Tag summary

Content type

Image

Digest

Size

277.7 MB

Last updated

about 9 years ago

docker pull shintech/shintech-server-psql