device-local-server

0

Описание

Simple starter template for ExpressJs and TypeScript based on expressjs/generator and TypeScript-Node-Starter

Языки

  • TypeScript82,3%
  • JavaScript8,2%
  • Pug6,6%
  • CSS2,9%
README.md

Express TypeScript template

Pre-reqs

Getting started

  • Clone the repository
git clone https://github.com/greenroach/express-ts-template.git
  • Install dependencies
cd <project_name> npm install
  • Build and run the project
npm run build npm start

Navigate to

http://localhost:3000

Using the debugger in VS Code

Debugging is one of the places where VS Code really shines over other editors. Node.js debugging in VS Code is easy to setup and even easier to use. This project comes pre-configured with everything you need to get started.

When you hit

F5
in VS Code, it looks for a top level
.vscode
folder with a
launch.json
file. In this file, you can tell VS Code exactly what you want to do:

This is mostly identical to the "Node.js: Attach by Process ID" template with one minor change. We added

"protocol": "inspector"
which tells VS Code that we're using the latest version of Node which uses a new debug protocol.

With this file in place, you can hit

F5
to attach a debugger. You will probably have multiple node processes running, so you need to find the one that shows
node dist/server.js
. Now just set your breakpoints and go!


Based on TypeScript Node Starter and Express Generator