Skip to content
This repository has been archived by the owner on Oct 15, 2022. It is now read-only.

Commit

Permalink
Build a better workflow without grunt.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan Ling committed Sep 26, 2018
1 parent 67be2f9 commit c1d882b
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 23 deletions.
18 changes: 0 additions & 18 deletions bin/www

This file was deleted.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"main": "app.js",
"scripts": {
"build": "tsc -p .",
"dev": "cross-env NODE-ENV=development nodemon ./bin/www",
"start": "node ./bin/www",
"dev": "cross-env NODE-ENV=development nodemon --exec ./node_modules/.bin/ts-node -- ./src/index.ts",
"start": "node ./build/index.js",
"test": "ts-mocha -p src/ src/**/*.spec.ts"
},
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion src/HttpHelper/HttpHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export default class HttpHelper {
const bind = typeof addr === "string"
? "pipe " + addr
: "port " + addr.port;
debug("Listening on " + bind);
debug("Listening on balls and a half num," + bind);
});

// listen on provided ports
Expand Down
16 changes: 16 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/env node
"use strict";

// module dependencies
import HttpHelper from "./HttpHelper/HttpHelper";
import Server from "./Server/Server";
// create http server

const app = Server.bootstrap().app;
const httpPort = HttpHelper.normalizePort(process.env.PORT, 8080);
app.set("port", httpPort);
const httpServer = HttpHelper.createServer({
app,
debugFunc: (str: string) => { console.log(str); },
httpPort,
}, true);
4 changes: 2 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
"noImplicitAny": true,
"moduleResolution": "node",
"sourceMap": true,
"outDir": "../build",
"outDir": "./build",
"baseUrl": "."
},
"exclude": [
"**/*.spec.ts"
],
"include": [
"src/**/*.ts"
"**/*.ts"
]
}

0 comments on commit c1d882b

Please sign in to comment.