Code Monkey home page Code Monkey logo

imbit-server's Introduction

Bnstd服务层 文档说明

部署

环境要求

  • nodejs 8.11.0+
  • postgresql 9.0+

启动步骤

安装依赖:

npm i

** 启动:** 开发环境

npm run start

线上环境

npm run prd

** docker下**

安装docker

git clone -b v2 https://github.com/binstd/binstd-service
cd binstd-service/
sudo docker build -t binstd-service .

运行测试:

sudo docker run -p 80:3000 binstd-service

正式:

sudo docker run -d -p 80:3000 binstd-service

可自行修改docker的,已安装git和docker想快速部署,复制work.sh的内容即可

核心代码二次开发

代码结构

  • Controller/* (控制器目录)
  • middleware/* (所有中间件所在的目录)
  • middleware/index.js (载入中间件)
  • model/* (sequelize的model模型)
  • utils/* (工具库辅助方法所在,也可以放置一些配置)
  • Config.js (系统核心配置,如数据库,连接区块链rpc接口)
  • router.js (所有的路由规则所在)

核心依赖的第三方模块

  • koa-router (路由)
  • koa-jwt (jwt验证)
  • sequelize (数据库orm库 支持mysql,postgresql,mongodb等)

imbit-server's People

Contributors

ethluz avatar

Watchers

James Cloos avatar  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.