Giter Site home page Giter Site logo

fepubfree's Introduction

Pubfree 前端发布平台

描述

主要技术栈

  • 前端 React + Antd
  • 后端 NodeJS + MySQL
  • 工具 pnpm、vite  

目录

安装

安装前请确保已安装 MySQL 和 NodeJS,为了正常使用 vite, 请确保 NodeJS 版本为 ^14.18.0 || >=16.0.0。  

安装 pnpm

npm install -g pnpm

查看 pnpm 版本,确认 pnpm 已经安装成功

pnpm -v

 

安装依赖

项目根目录下安装项目依赖

pnpm install

 

数据库建表

将 open-source/packages/server-api/script/sql/init.sql 文件中的 sql 语句复制到 MySQL 中运行,建立服务所需的基本数据库表。  

运行 server-api

在 open-source/packages/server-api/resource 下新建 config.default.json,并配置数据库等信息

{
  "orm": {
    "host": "127.0.0.1",
    "port": 3306,
    "database": "pubfree_open",
    "username": "root",
    "password": "root"
  }
}

本地运行

cd packages/server-api
pnpm dev

在本地 http://127.0.0.1:7001 下便可访问到 cms 页面用到的接口。  

运行 server-client

在 open-source/packages/server-client/resource 下新建 config.default.json,并配置数据库等信息

{
  "mysql": {
    "enable": true,
    "options": {
      "host": "127.0.0.1",
      "port": 3306,
      "database": "pubfree_open",
      "username": "root",
      "password": "root"
    }
  },
  "schedule": {
    "enable": true
  }
}

本地运行

cd packages/server-client
pnpm dev

通过 http://127.0.0.1:3000 可访问到发布在平台上的页面。  

运行 client-web

本地运行

cd packages/client-web
pnpm dev

通过 http://localhost:5173 可访问发布平台的 cms 页面。  

使用

快速发布流程

1. 创建项目

image  

2. 资源发布

使用 zip 上传(本地开发环境不支持)或者输入 html 资源地址发布 image image  

3. 资源生效

image  

4. 查看页面

image  

License

MIT © JD.com, Inc.

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.