-
Notifications
You must be signed in to change notification settings - Fork 4
demo backend with flask and neo4j
License
wgwz/flask-neo4j-demo
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Using this project:
==================
- Install docker and docker-compose
- Then run:
docker-compose up --build
What will that ^ do?
===================
--> Launch two instances of Neo4J
+ one for development and one for testing
--> Launch the flask builtin server
+ which will serve the endpoints, templates, etc.
+ for production, i.e. setup a gunicorn worker and deploy on heroku
Project Structure:
=================
--> models.py:
---------
definition of nodes and relationships
that comprise the model
--> factory.py:
----------
the flask app factory pattern
--> extensions.py:
-------------
all flask extensions used get initialized here
--> views.py:
--------
the endpoints for the API/server
--> _cliapp.py:
----------
the entrypoint to the flask app instance
for this project
Running the tests:
=================
docker-compose exec web pytest
Other hints:
===========
Try these in a new terminal:
(After running docker-compose up --build)
- docker-compose exec web sh
- docker-compose exec web python
- Dockerfile and docker-compose.yml is
where the magic happens
References:
==========
- To learn more on Docker: https://diveintodocker.com/courses/dive-into-docker
- py2neo docs: http://py2neo.org/v3/index.htmlAbout
demo backend with flask and neo4j
Topics
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published