create-ts-express-server
v1.3.0
Published
A cli starter tool for scaffolding an Express app with TypeScript and path aliases.
Downloads
75
Maintainers
Readme
create-ts-express-server
Usage
npm create ts-express-server@latest
yarn create ts-express-server
pnpm create ts-express-server
- Optionally pass project directory
valid-dir | .
as:
pnpm create ts-express-server <project-directory>
- Create a .env file and add PORT variable to costumize the port used to start the server (default: 3000).
features
- Path Aliases (default "@/" for "src/" dir, you can customize it in tsconfig.json/paths)
- MVC pattern (kind of)
- Production ready (almost)
annotations
- Dev server relies on ts-node-dev
- To remove path alias configuration remove "paths" option on tsconfig.json, and replace the scripts in package.json with these:
{
//...
"scripts": {
//...
"dev": "tsnd --respawn --rs --cls src/main.ts",
"build": "tsc"
//...
}
//...
}