Create express with typescript is a template That is used to create a quick basic template with a typescript application without any configuration. It's easy to use and does not need to headache to install the multiple dependencies which are required every time when you create a new project structure.
You don't need to set up a command and configuration file.
If you want to create a basic structure in express app with typescript You just run only one command on our terminal. But make sure Node js is already installed in your system.
And also npm version is5.0 or later
Run the below command on the terminal and install the Express application Boilerplate code with all the configurations.
npx create-express-with-typescript app-nameIf you look up the script section on the package.json file you can get four command Start build dev and test If you want to start the Server you should run
npm run startnpm run start or npm start command starts your app.
if you want to create a build in the Typescript-Express application you just run only one command, This command generates a build in the dist directory which is presented in your current working directory.
npm run buildWe are already Handel your development repeatability to build start and restart our server every time. You only need to run one command and start building our application when you save the file application is rebuilt and restarted automatically.
npm run dev- You can change our
nameAs per your requirement - You can change
Versionas well if you have needed - You can remove the
bincommand because it's does't need any more when you application successfully generated. - You can also change author name
{
"name": "create-express-with-typescript",
"version": "1.0.0",
"description": "Create Express app is a tamplate which is use to Create a express app templete api",
"main": "app.js",
"bin": {
"create-express": "./bin/createExpress.js"
},
"private": "true",
"scripts": {
"start": "npx tsc && nodemon dist/app.js",
"build": "npx tsc",
"dev": "concurrently \"npx tsc --watch\" \"nodemon -q dist/app.js\" "
},
"keywords": ["create-express-app", "express-app-template"],
"author": "Aadarsh Singh",
"license": "ISC",
"dependencies": {
"cors": "^2.8.5",
"express": "^4.18.2"
},
"devDependencies": {
"@types/express": "^4.17.14",
"@types/node": "^18.11.9",
"concurrently": "^7.5.0",
"nodemon": "^2.0.20",
"typescript": "^4.8.4"
}
}Above some dev dependency as well as dependency some of the dependency is required to run the express application Like express @types/express nodemode Typescript and @types/node So you can't remove these dependency.
And other dependency you can remove as per your requirement.
Copyright © 2019 Aadarsh Singh.
This project is MIT licensed.
👤 Aadarsh Singh