Skip to content

icarocamelo/flask-tuto

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Basic REST API with Flask and Mongodb

Simple REST API with SSL and Basic HTTP Authentication

Install all dependencies

  • pip install -r requirements.txt

Update depedencies from code

  • pip freeze > requirements.txt

Export FLASK_APP env variable

  • export FLASK_APP=app/server.py

Mongodb

1. Install mongodb using Docker (https://hub.docker.com/_/mongo/)
2. Create user
    - db.users.insertOne({'name':'admin', 'password':'admin'})
3. Check creation
    - db.users.find()

Run server

  • python app/server.py DEBUG SSL

  • Example: python app/server.py True True

Useful resources

About

REST API using Flask

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages