Skip to content

Commit 9e54a5a

Browse files
committed
Remove nginx and add gunicorn
1 parent 1ee9c82 commit 9e54a5a

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ Connect **http://localhost**
1010
### Set up the development environment
1111

1212
```shell
13-
$ conda create -n nginx_flask_mysql python=3.8
14-
$ conda activate nginx_flask_mysql
13+
$ conda create -n flask_mysql python=3.8
14+
$ conda activate flask_mysql
1515
$ pip install -r requirements.txt
1616
```
1717

@@ -24,21 +24,21 @@ $ docker-compose run --rm --name project-db --service-ports db
2424
### Upload the initial data of the DB server
2525

2626
```shell
27-
$ conda activate nginx_flask_mysql
27+
$ conda activate flask_mysql
2828
app$ DEBUG=1 ./migrate.sh $PWD/../db/migrations/
2929
app$ DEBUG=1 python upload.py ../db/wanted_temp_data.csv
3030
```
3131

3232
### Run application server
3333

3434
```shell
35-
$ conda activate nginx_flask_mysql
35+
$ conda activate flask_mysql
3636
app$ DEBUG=1 python $PWD/app.py
3737
```
3838

3939
## How to run
4040

41-
### nginx(:80) + flask(:5000) + mysql(:3306)
41+
### flask(:5000) + mysql(:3306)
4242

4343
```shell
4444
$ docker-compose build

app/routes.py

-3
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,8 @@
33
from flask_restx import Api, Resource, reqparse
44
from models import db, Company, Language, Tag, CompanyName, TagName, CompanyTag
55

6-
76
api = Api()
87

9-
108
get_parser = reqparse.RequestParser()
119
get_parser.add_argument('name', required=True, type=str, location='args')
1210

@@ -79,7 +77,6 @@ def get(self):
7977

8078
return jsonify(results)
8179

82-
8380
@api.expect(put_parser)
8481
@api.doc(responses={
8582
200: 'Success',

0 commit comments

Comments
 (0)