This repository has been archived by the owner on Nov 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Samrith Shankar
committed
Feb 22, 2020
1 parent
9aadff8
commit 723d41b
Showing
5 changed files
with
880 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"exec": "ts-node src/server", | ||
"env": { | ||
"NODE_ENV": "development", | ||
"MY_MESSAGE": "This is my message to the world!" | ||
}, | ||
"logLevel": 4 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,23 @@ | ||
{ | ||
"name": "nodehawk-express-typescript", | ||
"version": "1.0.0", | ||
"description": "An Express Typescript boilerplate with Nodehawk.", | ||
"description": "An Express Javascript boilerplate with Nodehawk.", | ||
"repository": "[email protected]:samrith-s/nodehawk.git", | ||
"author": "Samrith Shankar <[email protected]>", | ||
"license": "MIT", | ||
"private": true | ||
"private": true, | ||
"scripts": { | ||
"start": "nodehawk" | ||
}, | ||
"dependencies": { | ||
"chalk": "link:../../node_modules/chalk", | ||
"express": "^4.17.1" | ||
}, | ||
"devDependencies": { | ||
"@types/express": "^4.17.2", | ||
"@types/node": "^13.7.4", | ||
"nodehawk": "link:../..", | ||
"ts-node": "^8.6.2", | ||
"typescript": "^3.8.2" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import * as express from "express"; | ||
import chalk from "chalk"; | ||
|
||
const app = express(); | ||
|
||
app.get("/", (req, res) => { | ||
res.send(process.env.MY_MESSAGE); | ||
}); | ||
|
||
app.listen(process.env.PORT, () => { | ||
console.log( | ||
chalk`{yellow.bold App running on http://localhost:${process.env.PORT}}` | ||
); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"include": ["./src/**/*.ts", "./src/**/*.json"], | ||
"exclude": ["node_modules"], | ||
"compilerOptions": { | ||
"baseUrl": "src", | ||
"outDir": "build", | ||
"rootDir": ".", | ||
"module": "commonjs", | ||
"target": "es2015" | ||
} | ||
} |
Oops, something went wrong.