Example how to use
- clone repository
- install
eslint
globlly:npm i -g [email protected]
- run
npm i
- run
npm run build
andnpm start
or directly runnpm run build && npm start
- If you want to start while watching, you have to open two terminals.
- The first one is to run.
npm run watch
. The second one is to runnpm run dev
- see
http://localhost:3000/user/str
,This is an example of return string - see
http://localhost:3000/user/json
,This is an example of return json - Return * or rep.send (*) the effect is the same.Cannot be used at the same time
- Static routing can use. HTML to avoid conflict with normal routing
Advantage
- Babel uses the next generation of JS syntax sugar, which is the most concise and readable code in history
- Support typeorm, the best typescript ORM framework, easily write all kinds of logic of Dao layer
- With the blessing of fastify, its performance has entered the top five in the world, and its complexity has been further improved, and it can complete the best functions
- Gulp can be called the king of automation. With gulp package, the code of Pro environment is more robust, but the volume is smaller
- Nodemon can help more friendly development in the dev environment, but it also needs
npm run watch:pro
- Various plug-ins work together to allow partial use of static type modification and type inference to support back-end development and maintenance
- Modular development makes the application easier to layer and provides an easy-to-use modular management mechanism
- AOP code is written in a low-key way, but it is easy to realize log, interceptor, filter and other functions
- MVC, API, websocket, microservice and other systems are constructed fastest, fastest and most fiercely
Points for attention
- support experimental syntax just like obj::func、?.、??、|>、#、||=、&&=、@decorators、function*、do{...}
- support strip-types. eg:function foo(one: any, two: number, three?): string {}
- Patch of Windows users using CP or RM Linux command in
src/windows-lib
- What is missing from the schema now is the querystring and headers,but not interferences
- Request characters will be accurate to case such as
localhost:3000/post
,iflocalhost:3000/POst
will not right