https://github.com/holistics/counters
Simple Nodejs & PostgreSQL application
https://github.com/holistics/counters
Last synced: 15 days ago
JSON representation
Simple Nodejs & PostgreSQL application
- Host: GitHub
- URL: https://github.com/holistics/counters
- Owner: holistics
- Created: 2023-12-08T02:38:51.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-06-21T22:56:44.000Z (about 2 years ago)
- Last Synced: 2025-02-23T01:44:26.463Z (over 1 year ago)
- Language: JavaScript
- Size: 328 KB
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Hello World
---
A simple Nodejs API service that connects to a PostgreSQL database
## Setup
- Create a new database in PostgreSQL, for example `counters`
- Create the table in the database with the SQL in `create_table.sql`
- Copy the `.env.sample` to `.env` and update it with the database credential
- Install nodejs packages
```
npm install
```
## Usage
- Start in dev mode
```
npm run dev
```
By default, the app can be accessed at http://localhost:3000
- Run test
```
npm test
```
- Start the server in production mode
```
npm run start
```
- Run the linter
```
npm run lint
```