Giter VIP home page Giter VIP logo

hanbao-server's Introduction

Build Status Coverage Status node


Hanbao Logo


介绍

Hanbao 是一个利用 Nest 构建的后端服务项目

依赖

需要安装的服务

使用 Docker

项目提供了Docker 配置文件,如果你不想对依赖环境进行设置可以使用 Docker 来快速启动依赖服务

后台启动依赖服务

$ docker-compose up -d

结束服务

$ docker-compose down

手动设置

项目中使用 typeorm 作为ORM连接数据库,默认使用的 mysql 作为数据库,你可以在这里查看如何 使用其他数据库

在启动项目之前你需要先确保本地已经安装好 mysqlredis 并且启动服务, 你可以在 这里 修改 mysql 的连接配置

数据库

启动时会默认连接 mysqlhanbao 数据库, 在测试时会连接 hanbaoTest

如果你是第一次启动必须先初始化数据库

CREATE DATABASE IF NOT EXISTS hanbao default character set utf8mb4 collate utf8mb4_unicode_ci;
CREATE DATABASE IF NOT EXISTS hanbaoTest default character set utf8mb4 collate utf8mb4_unicode_ci;

系统有部分初始化数据,在创建好数据库后请将 ORM/seeds 中的 sql 执行

邮箱服务

服务中会使用 nodemailer 进行邮件发送,请将 .setup_temp.js 改名为 setup.js 并将其中的值换成你的配置

安装

$ git clone https://github.com/mosaice/hanbao-server.git
$ cd hanbao-server
$ npm install

使用

$ npm start

其他命令请详见 package.json

hanbao-server's People

Contributors

mosaice avatar

Stargazers

P-Chan avatar kokoro 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.