Skip to content

weishour-dev/weinoter-backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WeiShour Logo

描述

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

pm2 部署

$ 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

Nginx 配置 (例)

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;
    }
}

内置插件

部署

docker build -t weishour/weinoter-backend:v1 .
# 压缩镜像
docker-slim build --target weishour/weinoter-backend --tag weishour/weinoter-backend.slim:v1

About

唯守笔记后端

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages