You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Install [docker-compose](https://docs.docker.com/compose/install/) and do `docker-compose up`
15
9
16
-
Install docker-compose and do `docker-compose up`. Don't forget to setup your
17
-
.env file.
10
+
## Set up guide: The 'bothersome' way
18
11
19
-
### Pipenv
20
-
- run `python -m pip install pipenv` to install pipenv
21
-
- run `pipenv install` inside the repository
22
-
-- if you have multiple Python versions installed you might need to specify which one to use `pipenv install --python=python3.7`
12
+
Requirements:
23
13
24
-
### SSL
25
-
- On Mac or linux install the openssl tool and run `openssl req -x509 -newkey rsa:4096 -nodes -out cert.pem -keyout key.pem -days 365` inside the repository
26
-
- On windows ... explanation will follow.
14
+
- Set up your [environment](#environment)
15
+
-[MySQL Community Server](`https://dev.mysql.com/downloads/mysql/`)
16
+
- Add line `CONNECT=mysql+pymysql://<user>:<password>@localhost:3306/<database name>` to your [`.env` file](#environment) to specify connection parameters
17
+
- Pipenv
18
+
1. Run `python -m pip install pipenv` to install pipenv
19
+
2. Run `pipenv install` inside the repository
20
+
- If you have multiple Python versions installed you might need to specify which one to use `pipenv install --python=python3.7`
21
+
- SSL
22
+
1. On Mac or Linux install the openssl tool and run `openssl req -x509 -newkey rsa:4096 -nodes -out cert.pem -keyout key.pem -days 365` inside the repository
23
+
2. On Windows ... explanation will follow.
27
24
28
-
### Environment
29
-
- create a file `.env`
30
-
--`.env` in this case is the full filename and not just the extension. `app.env` for example would not be loaded automatically by pipenv
31
-
-- add line `FLASK_ENV=development` to have the server automatically restart on file changes
32
-
-- add line `CONNECT=mysql+pymysql://<user>:<password>@localhost:3306/<database name>` to specify connection parameters
25
+
Run the server:
33
26
-`pipenv run python src/runserver.py`
34
-
-- run with flag `--reset-db` to recreate all tables on start
35
-
- add line `APP_SECRET=somepassword` as app secret. This is used to sign sessions among other things and is required
36
-
- Optain credentials for Github
37
-
-- Under your github account Settings go to Developer Settings and OAuth Apps
38
-
-- create a new one and set the homepage url to `https://localhost:5001/` and Authorization callback to `https://localhost:5001/login/github/authorized`
39
-
-- Copy the Client Id and Client Secret from that site and save them in `.env`as `GITHUB_ID` and `GITHUB_SECRET` respectively
27
+
- Run with flag `--reset-db` to drop and recreate all tables on start
28
+
29
+
## Environment
30
+
31
+
1. Create a file named `.env`
32
+
- Add line `FLASK_ENV=development` to have the server automatically restart on file changes
33
+
2. Add line `APP_SECRET=somepassword` as app secret. This is used to sign sessions among other things and is required
34
+
3. Obtain credentials for GitHub OAuth
35
+
- Under your GitHub account Settings go to Developer settings and OAuth Apps
36
+
- Create a new one and set the homepage url to `https://localhost:5001/` and Authorization callback to `https://localhost:5001/login/github/authorized`
37
+
- Copy the Client Id and Client Secret from that site and save them in `.env` as `GITHUB_ID` and `GITHUB_SECRET` respectively
40
38
41
39
Your `.env` file should now look something like [example.env](https://github.com/ProgrammingBuddies/programmingbuddies-api/blob/develop/example.env)
42
40
@@ -50,3 +48,9 @@ Your `.env` file should now look something like [example.env](https://github.com
50
48
-[ ] build DB and endpoints with basic CRUD
51
49
-[ ] add security for app (ie - bots, and non-human actors/clients)
52
50
-[ ] add users and profile stores as well as registration/management API endpoints for users
0 commit comments