Skip to content

atjiu/pybbs-front-react

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pybbs前端项目,使用react, redux, react-router, axios 开发

服务端地址:https://github.com/tomoya92/pybbs/tree/v4.0-mongodb-api

接口地址修改位置:src/js/axios.js

const Axios = axios.create({
  baseURL: process.env.NODE_ENV === 'production' ? 'https://api.yiiu.co' : 'http://localhost:8080'
});

开始

运行

yarn install
yarn start # yarn start 启动的 NODE_ENV 是 development

构建

yarn install
yarn build # yarn build 后,部署运行后的 NODE_ENV 是 production

部署

nginx部署

# 假如构建好的build文件夹放在 /home/build
server {
  listen 5000;
  server_name localhost;
  location / {
    root /home/build;
    index index.html;
  }
}

serve命令运行

npm -g install serve
serve build
# 后台运行
nohup serve build &

提问

贡献

欢迎大家提 issues 及 pr

捐赠

image image

如果觉得这个项目对你有帮助,欢迎捐赠!

开源协议

GNU AGPLv3

About

pybbs前端项目,react.js开发

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published