Skip to content

用node实现的缩短路径服务, 使用了nestjs, typeorm

Notifications You must be signed in to change notification settings

rabbitkiller-dev/node-nestjs-shorturl

Repository files navigation

Nest Logo

A progressive Node.js framework for building efficient and scalable server-side applications.

NPM Version Package License NPM Downloads CircleCI Coverage Discord Backers on Open Collective Sponsors on Open Collective Support us

Description

Nest framework TypeScript starter repository.

Installation

$ npm install

Running the app

# development
$ npm run start

# watch mode
$ npm run start:dev

# production mode
$ npm run start:prod

Test

# unit tests
$ npm run test

# e2e tests
$ npm run test:e2e

# test coverage
$ npm run test:cov

Publish / 发布

克隆本项目

git clone https://github.com/rabbitkiller-dev/node-nestjs-shorturl

安装依赖(node_modules)

npm install

通过docker-compose启动

  1. 使用mysql数据库(按需) 修改ormconfig.json
{
  "type": "mysql",
  "host": "ip::::",
  "port": 3306,
  "username": "username",
  "password": "password",
  "database": "database",
  "synchronize": true,
  "logging": true,
  "entities": ["dist/**/*.entity{.ts,.js}"]
}
  1. 修改docker-compose.yml
    • 修改ports(按需)
    • 修改重定向地址前缀(SHORT_URL_PREFIX)
    environment:
      - SHORT_URL_PREFIX=https://xxxxxx.dev/s

启动

docker-compose up -d

访问: http://localhost:9001

About

用node实现的缩短路径服务, 使用了nestjs, typeorm

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published