Back end server for fLotte
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
trivernis e1312d93bc
Fix docker build
Signed-off-by: trivernis <trivernis@protonmail.com>
4 years ago
src Switch to environment variables for database url 4 years ago
.eslintrc.json Change semi rule to enforce semicolons 4 years ago
.gitignore Add RPC Client implementation 4 years ago
Dockerfile Fix docker build 4 years ago
README.md Dockerfile: db connection works out of Docker container. 4 years ago
gulpfile.js typeorm: connected to postgres with typeorm 4 years ago
package-lock.json Add permission management 4 years ago
package.json Add permission management 4 years ago
tsconfig.json typeorm: connected to postgres with typeorm 4 years ago

README.md

API-server

Apollo server written in typescript that handles business logic.

Usage

Configure Postgres

Install postgresql and configure it, so the Database is accessible from remote hosts (only necessary for docker container Here)

See postgres client config in ormconfig.json

Docker

docker build -t <image name> .
docker run --rm --network="host" <image name>

The Dockerfile is pretty stupid and could produce a smaller image, e.g. with multistage build.

Compile and run

Install gulp if not installed

npm -g gulp
npm install
gulp
npm start

For Development

Install node_modules and gulp

npm -g gulp
npm install

And start gulp in watch mode

gulp watch

This will watch *.ts files in ./src and recompile to ./dist and finally restart the server.