Weinoter-Backend 唯守笔记后端。
$ npm install
$ cp .env.example .env
# 快速生成CRUD资源 (REST API / GraphQL / Microservice / WebSockets)
$ nest g resource xxx --no-spec
# 开发
$ npm run start
# 观察模式
$ npm run dev
# 产品模式
$ npm run prod
$ git checkout xxxx
$ npm config set registry="https://registry.npm.taobao.org/"
$ npm i --registry=https://mirrors.huaweicloud.com/repository/npm/
$ npm config rm proxy
$ npm config rm https-proxy
$ npm i @node-rs/argon2-linux-x64-gnu
$ npm run pm2
$ npm run doc
server {
listen 80;
server_name server.weishour.com;
location / {
proxy_pass http://127.0.0.1:3000;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header X-Nginx-Proxy true;
proxy_redirect off;
}
}
- nest-authz [v2.11.0] (Commits on Aug 6, 2024)
- typeorm-adapter [v1.7.0] (Commits on Mar 27, 2024)
- clickhouse [v1.1.0] (Commits on Sep 5, 2024)
docker build -t weishour/weinoter-backend:v1 .
# 压缩镜像
docker-slim build --target weishour/weinoter-backend --tag weishour/weinoter-backend.slim:v1