# e-strapi **Repository Path**: ymcdhr/e-strapi ## Basic Information - **Project Name**: e-strapi - **Description**: strapi 是一个简单的cms工具软件,支持可视化配置接口,支持对接graphql数据生成,支持后台文章发布等功能。 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-07-12 - **Last Updated**: 2021-07-14 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Strapi 应用 #### Strapi 安装 **1. 克隆项目到本地** ``` > git clone https://gitee.com/ymcdhr/e-strapi > npm install ``` **2. 安装过程中依赖sharp安装包** ,npm install如果报错:需要先安装node-gyp、c++编译环境等 - node-gyp安装说明:https://www.npmjs.com/package/node-gyp **3. 安装node-gyp又需要先安装python ** - windows下安装python:直接下载exe安装文件即可,https://www.python.org/downloads/ - linux下安装python:下载安装包,执行make安装然后配置环境变量路径 ``` > wget https://www.python.org/ftp/python/3.9.6/Python-3.9.6.tar.xz > tar xvf Python-3.9.6.tar.xz Python-3.9.6/ > cd Python-3.9.6/ > ./configure > make > make install > npm config set python ./python > npm install -g node-gyp ``` **4. 安装项目依赖** ,需要管理员权限(因为需要访问/root/.npm/_libvips目录) ``` > npm config set sharp_binary_host "https://npm.taobao.org/mirrors/sharp" > npm config set sharp_libvips_binary_host "https://npm.taobao.org/mirrors/sharp-libvips" > cd e-strapi/ > sudo npm install ``` **5. 服务器打包构建** ``` > npm run build > npm run start // 启动后可以通过linux公网ip访问,例如:http://106.75.93.71:1337/admin > pm2 start npm -- run start --name blog-backend // 使用pm2启动(需要先安装pm2) ``` **6. 本地调试** ``` > npm run develop ``` **7. 测试账号** - 注意:本工程中有一些基础数据用于测试;它们存在本地缓存文件中: ``` ./cache ./tmp public/uploads/* ``` - 注意:本工程有一个之前建的测试账号: ``` 账号:252332076@qq.com 密码:Str123456 ``` - api访问,例如:http://106.75.93.71:1337/blogs - strapi文件:https://strapi.io/documentation/developer-docs/latest/developer-resources/content-api/content-api.html#api-endpoints #### Strapi 应用场景 1. #### Strapi 基本使用