Skip to content

Commit

Permalink
Enhances the dev experience (#7)
Browse files Browse the repository at this point in the history
* added nodemon and ts-node dev dependencies

* added nodemon.json config file

* updated vscode launch file

* updated readme
  • Loading branch information
mikecabana authored Sep 30, 2022
1 parent d067163 commit 878403a
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"request": "launch",
"name": "Launch via NPM",
"runtimeExecutable": "npm",
"runtimeArgs": ["run-script", "start"],
"runtimeArgs": ["run-script", "dev"],
"console": "integratedTerminal",
"restart": true
}
Expand Down
30 changes: 15 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
# express-ts-starter
# Express Typescript Starter Project

A starter express app using Typescript! The point of this project is to give you a super simple foundation to get off the ground quickly. It's unopiniated, has no structure(ish) and no templating. These are decisions you'll need to make😜!
A starter node app using express and typescript! A super simple base to get off the ground quickly. It's unopiniated, has no structure(ish) and no templating.

Oh it also gives you VSCode debuging to boot!
## How to use?

### How to use?
### Prerequisites

#### Prerequisites
make sure you have `node` and `npm` installed

Node: `v10+` <br>
npm: `v6+` <sub>(usually ships with node)</sub>
### Commands

#### Steps to run
#### Install

If it's the first time trying to run the starter, install all dependancies
If it's the first time trying to run this starter project, install all the dependancies
~~~terminal
npm install
~~~

Run the `development` server
#### Start developemnt server

Start the `development` server by running the following command in a terminal from the root folder of the project
~~~terminal
npm run dev
~~~

Start a `development` server which the `VSCode debugger` can attach to. The VSCode debug launch config can be found in [.vscode](.vscode).
~~~terminal
npm run debug
~~~
If you're in VSCode, run using the debugger by hitting `F5`

#### Build and Start for production

Build the project (outputs to `./dist`)
~~~terminal
Expand All @@ -38,7 +38,7 @@ Run the built project
npm start
~~~

### How to use with Docker?
## How to use with Docker?

~~~terminal
docker build -t ts-express-app .
Expand Down
5 changes: 5 additions & 0 deletions nodemon.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"execMap": {
"ts": "ts-node"
}
}
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"tsc": "tsc",
"lint": "eslint . --ext .ts",
"build": "tsc",
"start": "npm run build && node dist/app.js"
"start": "npm run build && node dist/app.js",
"dev": "nodemon ./src/app.ts"
},
"keywords": [
"node",
Expand Down Expand Up @@ -36,6 +37,8 @@
"@typescript-eslint/eslint-plugin": "^5.32.0",
"@typescript-eslint/parser": "^5.32.0",
"eslint": "^8.21.0",
"nodemon": "^2.0.20",
"ts-node": "^10.9.1",
"typescript": "^4.7.4"
},
"dependencies": {
Expand Down

0 comments on commit 878403a

Please sign in to comment.