nideshop小程序商城部署

本地开发环境配置

  • 克隆项目到本地
git clone https://github.com/tumobi/nideshop
  • 创建数据库nideshop并导入项目根目录下的nideshop.sql
CREATE SCHEMA `nideshop` DEFAULT CHARACTER SET utf8mb4 ;

注意数据库字符编码为utf8mb4

  • 更改数据库配置 src/common/config/database.js
const mysql = require('think-model-mysql');

module.exports = {
    handle: mysql,
    database: 'nideshop',
 prefix: 'nideshop_',  encoding: 'utf8mb4',  host: '127.0.0.1',  port: '3306',  user: 'root',  password: '你的密码',  dateStrings: true };
  • 填写微信登录和微信支付配置 src/common/config/config.js
// default config
module.exports = {
  default_module: 'api',
  weixin: {
    appid: '', // 小程序 appid
 secret: '', // 小程序密钥  mch_id: '', // 商户帐号ID  partner_key: '', // 微信支付密钥  notify_url: '' // 微信异步通知,例:https://www.nideshop.com/api/pay/notify  } };
  • 在项目的根目录下安装依赖
npm install

 启动项目

Run As -->Node Appliction

猜你喜欢

转载自www.cnblogs.com/zhouxuejia/p/12115435.html
今日推荐