Will contain list of how to's.
- Install pipenv utility:
sudo apt install pipenv
(linux)- or install it via pip:
pip install pipenv
(orpython -m pip install pipenv
) - in case you're managing multiple Python installations, consider using
py -<version> -m pipenv
instead (e.g.py -3.9 -m pipenv check
command)
- Navigate to the
rearguarde
folder - To install a new package into env use
pipenv install <package_name>
;pipenv install
will download and setup all the dependencies specified inPipfile
- Then execute command
pipenv shell
to enter virtual environment
- Execute
deactivate
- To restore exactly the same state as before entering the virtual env, you may also need to kill current terminal session (i.e. ^D or ^Z for different shells) cause pipenv may create a subsession while providing an access to the virtual env (in most cases exiting from a subsession is sufficient for escaping from the environment)
- Create the
rearguarde/configuration/db_settings.json
as the copy ofrearguarde/configuration/db_settings_example.json
. Your newly created settings file has already been added to the.gitignore
and won't published to the repository - Enter the real value for the
crack_password
entry (it should be known since you've finished this guide) - Probe your connection with running
rearguarde/model/zeugma.py
: on success, you'll see a prompt with possible database manipulations
- Enter virtual environment
- Execute command
flask run
- Then you will see debug info in your console and url (default:
http://localhost:5000/
) - Just open url and you're the man
- Launch Rearguarde application
- Execute
python tests/test_api.py
Developer is encouraged to use command line shell for interacting with the application. Flask
provides an integration with Python's Click comprehensible library for CLI implementation. Apart
from this very project, feel free to append --help
or -h
for every command you type and you'll
be awarded. Enter flask --help
to gain access to the list of available utilities. There is a
fistful of custom commands as well.
- Ensure you've created the database instance as described in the guide
- Edit
rearguarde/alembic.ini
sosqlalchemy.url
contains correct password. Get more info from migrations instructions - While in
rearguarde
, runalembic upgrade head
; in case of any errors, try to run migrations one by one
Since the vanguarde app is using the npm package manager, you must install it first. This task is straightforward: just install Node.js from official site and npm comes with it. More info.
Next, you shall install all project dependencies. Go to the app directory and
npm install
Now, you must only endure long await of downloading and unpacking.
Note. This command will create a special directory node_modules
inside the app
directory and will be ~200 Mb size. Yes, this is normal.
To run the app you must simply call
npm run start
or npm start
This will run node server and you can look at the project at http://localhost:5000/
.