GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - harlanjun/coco-server: coco 服务端

BranchesTags
Open more actions menu
 
 

Latest commit

 

History

5 Commits
5 Commits

Folders and files

NameName
Last commit message
Last commit date
app
app
 
 
config
config
 
 
.gitignore
.gitignore
 
 
app.js
app.js
 
 
package.json
package.json
 
 
readme.md
readme.md
 
 

Repository files navigation

coco 后台

mysql 配置

module.exports = {
  sequelize: {
    dialect: 'mysql',
    host: '127.0.0.1',
    port: 3306,
    database: 'coco',
    username: 'root',
    password: 'root1234',
    logging: false
  }
};

数据表结构:

1. project

'use strict';

module.exports = app => {
  const { STRING, INTEGER, DATE, TEXT } = app.Sequelize;

  const Page = app.model.define('project', {
    id: { type: INTEGER, primaryKey: true, autoIncrement: true },
    templateId: INTEGER,
    name: STRING(100),
    pageConfig: TEXT,
    gitConfig: TEXT,
    releaseInfo: TEXT,
    version: STRING(100),
    desc: STRING(1000),
  }, {
    paranoid: true
  });

  return Page;
};

2. template

'use strict';

module.exports = app => {
  const { STRING, INTEGER, DATE, BIGINT } = app.Sequelize;

  const Template = app.model.define('template', {
    id: { type: INTEGER, primaryKey: true, autoIncrement: true },
    templateName: STRING(100),
    author: STRING(100),
    name: STRING(100),
    snapshot: STRING(200),
    gitUrl: STRING(200),
    type: INTEGER,
    version: STRING(100),
  }, {
    paranoid: true
  });

  return Template;
};

启动服务

先创建 mysql 数据库 coco。在启动服务,会自动创建表

$ npm run dev

About

coco 服务端

Resources

Readme
Activity

Stars

0 stars

Watchers

0 watching

Forks

1 fork
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.