Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/billykong/express-database-checker
https://github.com/billykong/express-database-checker
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/billykong/express-database-checker
- Owner: billykong
- Created: 2020-05-23T12:13:18.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-04-10T15:15:47.000Z (almost 3 years ago)
- Last Synced: 2023-08-15T16:40:46.519Z (over 1 year ago)
- Language: JavaScript
- Size: 42 KB
- Stars: 1
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Express Database Checker
This is a dummy web service that display whether or not it has successfully connected to a database. I use it to test cloud deployment configuration, e.g. AWS. The serving port is `80` with `http`.
## Usage
1. `$ npm install`
2. `$ npm start`The database connection information should be provided by environment variables.
For example:
```bash
DATABASE_HOST=localhost
DATABASE_NAME=my_database
DATABASE_USERNAME=billykong
DATABASE_PASSWORD=xxxxxx
DATABASE_DIALECT=postgres # optional: default is postgres
DATABASE_PORT=5432 # optional: default is 5432
DATABASE_TIMEOUT=3000 # optional: default is 3000ms
```### DockerHub
1. `$ docker pull billykong/express-database-checker`
2. `$ docker run -p80:80 billykong/express-database-checker`## To build docker image for this app
`$ docker build -t billykong/express-database-checker .`
`$ docker push billykong/express-database-checker:latest`