- TypeScript
- Express JS
- TypeORM
- PostgreSQL
- SQLite
- Docker and docker compose
$ git clone https://github.com/webshining/expressjs.template project_name
$ cd project_name
$ cp .env.ren .env
$ npm install
$ npm run start:dev
$ npm run build
$ npm run start
Build required (
npm run build
)
$ docker-compose up -d
$ docker-compose logs app
$ docker-compose logs db
You can change default database(default - postgres), username(default - postgres) and password(default - postgres) in
docker-compose.yml
$ docker-compose exec db bash
# in container
$ psql -U postgres
Сreate a network (
network_name: changeable
(your custom network name))
$ docker network create network_name
Paste at the end of the docker-compose.yml file
networks:
default:
name: network_name
external: true
PORT
- The port on which the server will run
DB_NAME
- Database name(default: database)
DB_USER
- Database username(required for PostgreSQL)
DB_PASS
- Database password(required for PostgreSQL)
DB_HOST
- Database host(required for PostgreSQL)
DB_PORT
- Database port(required for PostgreSQL)
LOGGING
- Enable/Disable database logging