Skip to content

Logicify/hello-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hello API

An application providing greeting and echo operations via REST API.

Local deployment

Initial setup

  1. You'll need virtualenv tool, alternatively you can install it with your OS package manager
    pip install virtualenv
  2. Create new virtual environment with python3
    virtualenv -p python3 venv
  3. Activate it
    . venv/bin/activate
  4. Install application requirement into active virtual environment
    pip install -r requirements.txt

Run application

Just as for any Django app do

./manage.py runsever

Docker deployment (production aimed)

You will need to generate a SECRET_KEY for Django, see Django doc for details on how it's used. Recommended length is not less then 50 chars.

  1. Build docker image

    docker build -t impulse1_test .
  2. Run container

    docker run -d --name impulse1_test_instance \
       -e SECRET_KEY=${SECRET_KEY} \
       impulse1_test
  3. See src/impulse1_test/settings_prod.py for list of supported environment variables

About

Hello REST API with django & rest_framework

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published