This command line can be used to create an empty Node.js projects with initial TypeScript configuration files.
A new project can be initialized with ntscli
npx ntscli init myproject
or from custom repository with
npx ntscli git myproject 'https://github.com/aljosavister/template-ts-nodejs.git'
The command will pull source files from template-ts-nodejs and the boilerplate will be initialized with:
- Project file for Visual Studio Code with launcher and tasks
- ECMAScript 2022 configuration with Node.js-style module resolution
- Output directory for transpiled code: ./dist
- Dependencies: dotenv, typescript, prettier, eslint and copyfiles
- Start and build scripts that will use 'tsc' from within the project.
Your environment must meet these prerequisites:
- Node.js
- npm
- git
You can add additional module/s to the project.
- Documentation: module-ts-nodejs-express
- To add express web server with example api routes and default public folder, you can run:
cd myproject
npx ntscli express .
- Documentation: module-ts-nodejs-docker
- To add Dockerfile, configured specifically for Azure webapp, you can run:
cd myproject
npx ntscli docker .
- Project version to 1.0.0
ntscli
is still in alpha phase of development and it is provided for educational purposes and should not be used in production environments. It has not undergone the necessary testing, security checks, and optimizations required for reliable and secure production use. Deploying it in such contexts may lead to unforeseen issues and vulnerabilities. Use it at your own risk, and exercise caution when considering production deployment.