https://github.com/AliCW/nodejs-psql-backend-skeleton
JS backend using PSQL & express
https://github.com/AliCW/nodejs-psql-backend-skeleton
Last synced: over 1 year ago
JSON representation
JS backend using PSQL & express
- Host: GitHub
- URL: https://github.com/AliCW/nodejs-psql-backend-skeleton
- Owner: AliCW
- Created: 2024-08-28T02:18:06.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-08-31T12:29:30.000Z (almost 2 years ago)
- Last Synced: 2025-02-18T19:17:33.672Z (over 1 year ago)
- Language: JavaScript
- Size: 46.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# js-psql-backend-skeleton
JS backend using PSQL & express
Clone the repo
git clone https://github.com/AliCW/js-psql-backend-shell.git
Install the required packages
npm install
Start the backend
npm start
Setup environment variables `.env.test`, `.env.development` & `.env.production` & modify /db/seeds/setup.sql to match the database names set in environment variables.
Create the databases
npm run setup-dbs
Add to /data/development-data to create a data set & index file, then modify seed.js to accomodate for the new data & change the target database in connection.js. Once the data set is created, change the /db/seeds/run-seed.js file to select which data set to seed & run the below
npm run seed
The default IP is set to 127.0.0.1:9090
Query the database & paste the result to file with the below command.
npm run query