Skip to content

Commit dcfea99

Browse files
committed
First release.
Signed-off-by: Gao Mingfei <g199209@gmail.com>
1 parent 2e17c44 commit dcfea99

4 files changed

Lines changed: 450 additions & 19 deletions

File tree

Dockerfile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
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" ]

README.md

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,37 @@
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.

0 commit comments

Comments
 (0)