GithubHelp home page GithubHelp logo

alanreumy / aids-protection-node Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 4.13 MB

基于 Koa + TypeScript + sequelize + MySQL 的 预防艾滋病宣传 的小程序后端

License: Other

JavaScript 0.54% Shell 0.29% TypeScript 99.18%
koa sequelize mysql nodejs javascript typescript database

aids-protection-node's Introduction

aids-protection-node

基于 Koa + TypeScript + sequelize + MySQL 的 预防艾滋病宣传 的小程序后端

适合 Node.js 或 Typescript 初学者学习使用

使用方法

  • 克隆

    git clone [email protected]:ZimTang/aids-protection-node.git

  • 安装

    npm install

  • 在项目根目录下创建.env 文件

    // 数据库主机
    DATABASE_HOST = 'localhost'
    // 数据库名
    DATABASE_DB = 'aidsprotection'
    // 数据库类型
    DATABASE_DIALECT = 'mysql'
    // 数据库用户
    DATABASE_USER = 'root'
    // 数据库密码
    DATABASE_PASSWORD = '123456'
    // 连接池最大连接数
    DATABASE_POOP_MAX = 5
    // 连接池最小连接数
    DATABASE_POOL_MIN = 0
    DATABASE_POOL_ACQUIRE = 30000
    DATABASE_POOL_IDLE = 100000
    // 开启服务的端口
    PORT = 3000
  • 创建对应名称的数据库

  • 使用 openssl 生成一对私钥和公钥

    openssl
    
    > genrsa -out private.key 1024
    > rsa -in private.key -pubout -out public.key
  • 将生成的private.keypublic.key放在src/app/keys文件夹下

  • 运行

    npm run dev

主要功能

  • 用户请求
  • 问题请求
  • 回答请求
  • 评论请求
  • 咨询医生
  • 知识竞赛
  • 积分系统

在线文档

红丝带小卫士

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.