Skip to content

Commit

Permalink
Hot replace should work now (npm run watch-server) + removing leftovers
Browse files Browse the repository at this point in the history
  • Loading branch information
javieraviles committed Jul 16, 2019
1 parent 8cbb97f commit 57e5431
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "API REST using NodeJS and KOA framework, typescript. TypeORM for SQL with class-validators. Middlewares JWT, CORS, Winston Logger.",
"main": "dist/server.js",
"scripts": {
"watch-server": "nodemon --watch 'src/**/*' -e ts,tsx --exec ts-node src/server.ts",
"watch-server": "nodemon --watch src -e ts,tsx --exec ts-node src/server.ts",
"build-ts": "tsc",
"copy-static-assets": "ts-node copyStaticAssets.ts",
"tslint": "tslint -c tslint.json -p tsconfig.json",
Expand Down
4 changes: 0 additions & 4 deletions src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import * as bodyParser from 'koa-bodyparser';
import * as helmet from 'koa-helmet';
import * as cors from '@koa/cors';
import * as winston from 'winston';
import * as dotenv from 'dotenv';
import { createConnection } from 'typeorm';
import 'reflect-metadata';
import * as PostgressConnectionStringParser from 'pg-connection-string';
Expand All @@ -13,9 +12,6 @@ import { logger } from './logging';
import { config } from './config';
import { router } from './routes';

// Load environment variables from .env file, where API keys and passwords are configured
dotenv.config({ path: '.env' });

// Get DB connection options from env variable
const connectionOptions = PostgressConnectionStringParser.parse(config.databaseUrl);

Expand Down

0 comments on commit 57e5431

Please sign in to comment.