Skip to content

gerhean/multasko-backend

Repository files navigation

Multasko-Backend

Getting this respository

git clone git@github.com:gerhean/multasko-backend.git

Requirements

Using Venv

  1. Ensure you have virtualenv installed.

    • Follow this guide if necessary and you're on a Windows machine.
    • If you're on a mac e.g. OS X.
  2. Ensure you have GNU make installed (Windows only) (Optional).

    • Install chocolatey from here.
    • Then, choco install make.
  3. You can create your virtualenv. The steps for Windows look something like as follows:

    make venv 

    This will also install all dependencies as listed in the requirements.txt file.

  4. You can activate your virtualenv. This is not required for using make commands. The steps for Windows look something like as follows:

    venv\Scripts\activate 

    You should see a (venv) in front of the prompt on your console/terminal/command prompt. This shows your virtual environment is active.

  5. Set up database

    flask db init
    flask db migrate
    flask db upgrade
  6. Start flask server

     flask run

Make commands

These commands are to be executed in the base directory of this repo.

Execute them by typing a make in front of them. For example:

make venv 
  • Venv Helpers

    • venv
      • Install dependencies
    • clean-venv
      • Delete the venv folder
  • Server

Not Using Venv

1. Ensure that you have install the packages required

Install the pip packages (i)

pip install -r requirements.txt

2. Start the flask server

You can start the flask server using the command below

python manage.py

And now you can visit the site with the URL http://localhost:5000

Containerise the app

1. Build the image

You can build the image using the command below

docker build -t multasko-backend:latest .

2. Run container

You can Run container in background using the command below

docker run -dp 5000:5000 multasko-backend

And now you can visit the site with the URL http://localhost:5000

About

hack and roll 2021 backend

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors