Skip to content

Commit 86400bf

Browse files
realharley91petak5
andauthored
Readme (#55)
* Tidied README file * Fixed some typos * Small change in title I changed it back to "Tech stack" because 'technologies' seemed wide enough that we would have to add Docker, docker-compose, pipenv etc. * Final touches to the README Co-authored-by: petak5 <peterurgos12345@gmail.com>
1 parent a39fa26 commit 86400bf

File tree

1 file changed

+34
-34
lines changed

1 file changed

+34
-34
lines changed

README.md

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,46 @@
11
# Programming Buddies API
2-
API backend for Programming Buddies (projects management)
32

4-
## Tech Stack
5-
- Python 3.7
6-
- Flask
7-
- MySql
8-
- pyOpenSSL
3+
API backend for [Programming Buddies](https://github.com/ProgrammingBuddies/programmingbuddies-ui) (projects management)
94

10-
## Set up guide
11-
- Download and install MySQL Community Server from `https://dev.mysql.com/downloads/mysql/`
12-
- `git clone https://github.com/ProgrammingBuddies/programmingbuddies-api.git`
5+
## Set up guide: The simple way
136

14-
### The simple way
7+
- Set up your [environment](#environment)
8+
- Install [docker-compose](https://docs.docker.com/compose/install/) and do `docker-compose up`
159

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
1811

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:
2313

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.
2724

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:
3326
- `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
4038

4139
Your `.env` file should now look something like [example.env](https://github.com/ProgrammingBuddies/programmingbuddies-api/blob/develop/example.env)
4240

43-
## Milestones
44-
- [ ] build DB and endpoints with basic CRUD
45-
- [ ] add security for app (ie - bots, and non-human actors/clients)
46-
- [ ] add users and profile stores as well as registration/management API endpoints for users
41+
## Tech stack:
42+
43+
- Python
44+
- Flask
45+
- MySQL
46+
- pyOpenSSL

0 commit comments

Comments
 (0)