git clone https://github.com/tumobi/nideshop
CREATE SCHEMA `nideshop` DEFAULT CHARACTER SET utf8mb4 ;
注意数据库字符编码为utf8mb4
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
};
// 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
原文:https://www.cnblogs.com/zhouxuejia/p/12115435.html