https://github.com/boostio/issuehunt-balancer
Balance DB server
https://github.com/boostio/issuehunt-balancer
Last synced: 8 months ago
JSON representation
Balance DB server
- Host: GitHub
- URL: https://github.com/boostio/issuehunt-balancer
- Owner: BoostIO
- Created: 2018-05-14T08:36:24.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-06-19T20:43:04.000Z (over 7 years ago)
- Last Synced: 2025-05-07T17:13:53.975Z (8 months ago)
- Language: TypeScript
- Homepage:
- Size: 406 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Balancer
## Development
### Requirements
- Postgresql
- Node.js
### Prepare env vars
Create `.env` file.
Example:
```
NODE_ENV=development
PORT=3002
BASE_URL=http://localhost:3002
DB_TYPE=postgres
DB_HOST=localhost
DB_PORT=5432
DB_USERNAME=root
DB_PASSWORD=
DB_NAME=balancer
```
### Migrate
```
npm run migration:run
```
### Run server
```
npm run dev
```
## Test
### Prepare env vars
Create `test.env` file just like `.env`.
### Migrate
```
NODE_ENV=test npm run migration:run
```
### Run test
```
npm test
```
## Deployment
### Prepare env vars
Create `production.env` just like `.env`.
> You should exclude `PORT`. It will be provided by now.sh
### Migrate
```
NODE_ENV=production npm run migration:run
```
### Prepare now.json
Example:
```
{
"engines": {
"node": "8.11.1"
},
"dotenv": "production.env",
"alias": "DOMAIN_SHOULD_BE_HERE"
}
```
### Deploy
```
now && now alias
```