-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathREADME.txt
More file actions
41 lines (33 loc) · 1.1 KB
/
README.txt
File metadata and controls
41 lines (33 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# The IPFC middlware server, REST API
Built with Python Flask and Flask-SQLAlchemy.
https://pypi.org/project/Flask-SQLAlchemy/
Pulls data from a PostgreSQL server
for local testing, download repository, then:
### To run, in terminal:
`python3 -m venv ipfc-middleware`
### Activate the virtualenv (OS X & Linux)
`source ipfc-middleware/bin/activate`
### Activate the virtualenv (Windows)
`ipfc-middleware\Scripts\activate`
### then
`pip install -r requirements.txt`
(or pip3)
`pip3 install -r requirements.txt`
### local
Create an .env file:
SQLALCHEMY_DATABASE_URI=YOUR_DB_URI
(heroku provides this in resources page)
Format:
`dialect+driver://username:password@host:port/database`
Example Postgres:
`postgresql://scott:tiger@localhost/mydatabase`
### run in terminal with
`python3 app.py`
### bug: AttributeError: module 'bcrypt._bcrypt' has no attribute 'ffi'
`pip3 uninstall -y -r requirements.txt`
`pip3 install -r requirements.txt`
if that doesn't work, then
`pip freeze > requirements1.txt`
`pip3 uninstall -y -r requirements1.txt`
`pip3 install -r requirements.txt`
then delete requirements1.txt