Coder Social home page Coder Social logo

compass-service's Introduction

Compass Service

Development Feature

Script

# 根目录脚本
npm run start # 启动本地开发项目
npm run start:prod # 启动生产项目
npm run lint # 执行eslint检查
npm run test # 执行单元测试
npm run format # 执行代码格式化

# DB相关
# 所需环境变量: DATABASE_URL="mysql://demo:demo123456@localhost:3306/dbname"
prisma db pull # 读取数据库并将其转换为 Prisma 架构
prisma migrate dev --name init # 生成迁移文件 并直接执行
prisma migrate deploy # 运行迁移文件
prisma format # 格式化.prisma配置文件
prisma generate # 读取prisma生成更改, 每当.prisma架构发生变化后都应执行
prisma-docs-generator serve # 基于当前generate的结果 启动文档服务

Deploy

环境变量

# 参考prisma所需的数据库连接
DATABASE_URL="mysql://demo:demo123456@localhost:3306/dbname"
# 阿里云短信服务Access
ALI_CLOUD_SMS_ACCESS_KEY_ID="短信ak id字符串"
ALI_CLOUD_SMS_ACCESS_KEY_SECRET="短信ak secret字符串"
# 邮箱授权账号及密钥
MY_EMAIL_AUTH_USER="[email protected]"
MY_EMAIL_AUTH_PASSWORD="demo123456"

环境部署

cd deploy
docker compose up -d # 启动redis与mysql数据库 (已存在可忽略,供参考)
docker compose down # 移除启动的redis与mysql容器

docker pull docker378928518/compass:latest # 拉取已发布镜像
docker run -d --name compass -p 8080:8080 docker378928518/compass:latest # 运行镜像

Api Document

https://www.apifox.cn/apidoc/shared-7e08225b-7c61-4afd-a951-933d06f3aaf4

compass-service's People

Contributors

aiden-fe avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.