Skip to content

gengjian1203/code-maker-view-tool-service

Repository files navigation

code-maker-view-tool-service

基于微信云托管 Node.js Express 框架自建服务

快速开始

前往 微信云托管快速开始页面,选择相应语言的模板,根据引导完成部署。 https://cloud.tencent.com/

项目结构说明

.
├── Dockerfile
├── README.md
├── container.config.json
├── db.js
├── index.js
├── index.html
├── package.json
  • index.js:项目入口,实现主要的读写 API
  • db.js:数据库相关实现,使用 sequelize 作为 ORM
  • index.html:首页代码
  • package.json:Node.js 项目定义文件
  • container.config.json:云托管部署配置文件
  • Dockerfile:容器配置文件

License

MIT

const app = require("express")();
const bodyParser = require("body-parser");
const multer = require("multer"); // v1.0.5
const upload = multer(); // for parsing multipart/form-data

app.use(bodyParser.json()); // for parsing application/json
app.use(bodyParser.urlencoded({ extended: true })); // for parsing application/x-www-form-urlencoded

app.post("/profile", upload.array(), function(req, res, next) {
  console.log(req.body);
  res.json(req.body);
});

About

🔧 基于微信云托管 Node.js Express 框架自建服务

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published