File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ FROM node:18
2+
3+ # Create app directory
4+ WORKDIR /usr/src/app
5+
6+ # Install app dependencies
7+ # A wildcard is used to ensure both package.json AND package-lock.json are copied
8+ # where available (npm@5+)
9+ COPY package*.json ./
10+
11+ RUN npm install
12+
13+ # Bundle app source
14+ COPY app.js .
15+ COPY mysql-config.json .
16+
17+ ENV PORT=80
18+ EXPOSE $PORT
19+
20+ CMD [ "node" , "app.js" ]
Original file line number Diff line number Diff line change 1- # MySQL-REST-Proxy
1+ # MySQL-REST-Proxy
2+
3+ This is a simple node.js program used to provide RESTful interface for MySQL.
4+
5+ Frontend can do CRUD operations directly by sending RESTful request.
6+
7+ > Note: This's not safety, so do not use this method in production.
8+
9+ ## Usage
10+
11+ - MySQL connection configure:
12+ Edit ` mysql-config-demo.json ` file and rename to ` mysql-config.json ` .
13+
14+ - Install dependencies:
15+ ``` bash
16+ npm install
17+ ```
18+
19+ - Run:
20+ ``` bash
21+ npm start
22+ ```
23+ or
24+ ``` bash
25+ sudo PORT=80 node app.js
26+ ```
27+
28+ - Build docker image:
29+ ```
30+ npm run build
31+ ```
32+
33+ ## API Doc
34+
35+ https://www.apifox.cn/apidoc/shared-0f9baa3a-6a1e-40b6-9ae6-082b95005065/api-21444582
36+
37+ The API is designed for [ Baidu AMIS] ( https://github.com/baidu/amis ) , a front-end low-code framework.
You can’t perform that action at this time.
0 commit comments