https://docs.npmjs.com/getting-started/installing-node
https://www.npmjs.com/package/typescript
create table test (testcolumn varchar(20));
download and run npm install
export DB_USER='' DB='' DB_PASS='' DB_HOST='' DB_PORT='' DB_MAX_CLIENTS='' DB_IDLE_TIMEOUT_MS=''
this can also be done by creating a .env
file in the root of this project see .env.example
for a reference
run tsc
you can adjust transpiling settings in tsconfig.json
node build/app.js
http://localhost:3000/healthcheck and root return healthcheck
http://localhost:3000/servertime - returns servertime
http://localhost:3000/transaction - deletes then inserts into your DB using a transaction