express-typescript-draf-aplha v1.0.11
Express with TypeScript's application generator.
What is it?
Node express generator similar to express-generator-typescript module. In this case we user Webpack to compile the typescript to Javascript, also implement EsLint to follow good practice and a clean code.
Project example
When you run express-typescript-draf, it sets up a very basic application with a single basic route. This is to show how route work with node and express.
If you want an application ready to use with and db, you can pass the --mongo-db
option and you will have an
application which is ready to use mongoDb. The app is configured with production quality client-side security.
I highly encourage to use this option.
Installation
$ npm install -g express-typescript-draf
Quick Start
The quickest way to get started is use npx and pass in the name of the project you want to create. If you don't specify a project name, express-ts will be set up for you as default name.
Create the app:
$ npx express-typescript-draf "project name (default is express-ts)"
Start your express-generator-typescript app in development mode at http://localhost:3000/
:
$ cd "project name" && npm run dev:server
Available commands for the server.
- Run the production build:
npm start
. - Build the project for production:
npm run build
. - Run the server in development mode:
npm run dev:server
.
Debugging
During development, express-generator-typescript uses webpack
compile the typescript code to jascript
and nodemon
to restart the server when changes are detected.
Happy coding