1.3.0 • Published 11 months ago

create-ts-express-server v1.3.0

Weekly downloads
-
License
ISC
Repository
-
Last release
11 months ago

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"
		//...
	}
	//...
}