| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Create, read, update, delete in a Node.js app with an Express server and Postgres database.
brew install postgresql
brew services start postgresql
psql postgresCREATE ROLE me WITH LOGIN PASSWORD 'password';
ALTER ROLE me CREATEDB;
CREATE DATABASE api;
GRANT ALL PRIVILEGES ON DATABASE api TO me;psql -d api -U meCREATE TABLE users (
ID SERIAL PRIMARY KEY,
name VARCHAR(30),
email VARCHAR(30)
);
INSERT INTO users (name, email)
VALUES ('Jerry', 'jerry@example.com'), ('George', 'george@example.com');git clone git@github.com:taniarascia/node-api-postgres
cd node-api-postgres
npm install
node index.jsThis project is open source and available under the MIT License.
| Back | FazBrowse Home | New Git URL |