From a84fd152cd9e59f1458235546f3b1e584e41336e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Veljko=20Tekelerovi=C4=87?= Date: Mon, 2 Mar 2020 23:23:24 +0100 Subject: [PATCH] Shell startup and docs update - added startup.sh script for installing and running server (to add git cloning stage) - updated docs --- README.md | 15 +++++++++------ startup.sh | 12 ++++++++++++ 2 files changed, 21 insertions(+), 6 deletions(-) create mode 100644 startup.sh diff --git a/README.md b/README.md index fc073dc..3b4998e 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,15 @@ -# Simple JWT authentication template -This repository represents the source code template for `JWT` based authentication. -It can be used as starting point for more complex projects and needs. +# Authentication mechanism based on Flask + JWT +This repository represents the source code template for `Flask` implementation of `JWT` based authentication. +It can be used as starting point for more complex projects and requirements or can be completely customised to serve your needs. ## Installation and usage -Perhaps the easiest way to start using this template would be as follows: - - `clone` this repository +Perhaps the easiest way to start would be executing `startup.sh` script. Simple `(user)$ . startup.sh` would do the trick on UNIX based systems. + +Alternatively, step by step guide would be: + - `clone` this repository (*aim for master*) - `cd flask-auth-template` - - `pip install requirements.txt` + - `pip3 install -r requirements.txt` + - `python3 auth-module.py` **NOTE:** if you're on `MacOS` platforms, there might be a struggle with running this project due to known collision of `Python2.7` and `Python3+`. The conflict might be seen as "Module Import Error" no matter which Python you are using. To solve this, you might have to "fix" your `PYTHONPATH`. Check out this [article](https://bic-berkeley.github.io/psych-214-fall-2016/using_pythonpath.html) for more information. diff --git a/startup.sh b/startup.sh new file mode 100644 index 0000000..a2a6207 --- /dev/null +++ b/startup.sh @@ -0,0 +1,12 @@ +# Startup script. Will install needed modules and run the server +# origin clone and hard reset +echo "Cloning latest master" +# add git shell later + +# pip packages +echo "Installing needed modules via pip..." +pip3 install -r requirements.txt + +# server start +echo "Starting server in DEBUG mode" +python3 auth-module.py