Skip to content

IOLOII/get-version-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nest Logo

Description

用于获取 version 版本号服务

Static Badge Static Badge Static Badge

# get
localhost:9000/version/:appname
# post
localhost:9000/version/
{
  "appname":"demo"
  "version":"1.0.0"
  "username":"IOLOII"
}
# put
localhost:9000/version/:appname
{
  "version":"1.0.1"
}

创建脚本

nest g module demo # 创建模块

nest g controller demo # 创建拦截器

nest g service demo # 创建服务

数据库 sequelize

https://docs.nestjs.com/techniques/database#sequelize-integration

请求中常用修饰器

https://docs.nestjs.cn/8/controllers?id=request

@Request(),@Req()	req
@Response(),@Res()*	res
@Next()	next
@Session()	req.session
@Param(key?: string)	req.params/req.params[key]
@Body(key?: string)	req.body/req.body[key]
@Query(key?: string)	req.query/req.query[key]
@Headers(name?: string)	req.headers/req.headers[name]
@Ip()	req.ip
@HostParam()	req.hosts

Project setup

$ pnpm install

Compile and run the project

# development
$ pnpm run start

# watch mode
$ pnpm run start:dev

# production mode
$ pnpm run start:prod

Run tests

# unit tests
$ pnpm run test

# e2e tests
$ pnpm run test:e2e

# test coverage
$ pnpm run test:cov

Resources

  • Visualize your application graph and interact with the NestJS application in real-time using NestJS Devtools.

Stay in touch

License

Nest is MIT licensed.

Deployment

When you're ready to deploy your NestJS application to production, there are some key steps you can take to ensure it runs as efficiently as possible. Check out the deployment documentation for more information.

If you are looking for a cloud-based platform to deploy your NestJS application, check out Mau, our official platform for deploying NestJS applications on AWS. Mau makes deployment straightforward and fast, requiring just a few simple steps:

$ pnpm install -g mau
$ mau deploy

With Mau, you can deploy your application in just a few clicks, allowing you to focus on building features rather than managing infrastructure.