Skip to content

zmofei/zhuwenlong.com-frontend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 

Repository files navigation

My blog

https://www.zhuwenlong.com

如何部署

1. 配置

  • 将目录中的code/s.example.yaml文件复制为code/s.yaml
  • 修改code/s.yaml的敏感信息,如将 environmentVariables 中的 xxxx 修改为真实参数:
environmentVariables:
    MysqlHost: xxxx #Mysql 数据库地址
    MysqlUser: xxxx # MySQL 数据库用户名
    MysqlDB: xxxx # MySQL 数据库DB名称
    MysqlPwd: xxxx # MySQL 数据库密码
    EmailUser: xxxx # 邮件系统用户名(用来发送留言回复等email)
    EmailPwd: xxxx # 邮件系统密码

2. 安装依赖

cd code
npm install

3. 部署到阿里云函数计算

s deploy

如何本地测试

Run the commend below, and open a browser to make sure the site works. If you don't have the s (i.e. serverless devs tool), follow this doc to install it.

s local start --custom-domain auto