This repo aims to showcase how to create a simple Hacker News clone with Django and GraphQL. Demo
First, is recommended to have a virtual enviroment for running our project:
# Installing virtualenv-burrito https://github.com/brainsik/virtualenv-burrito
curl -sL https://raw.githubusercontent.com/brainsik/virtualenv-burrito/master/virtualenv-burrito.sh | $SHELL
# Make a new python enviroment
mkvirtualenv howtographene
Then, install the dependencies and run the app:
pip install -r requirements.txt
pip install -r requirements-test.txt
# This will create the DB
python hackernews/manage.py migrate
# This will run the dev server
python hackernews/manage.py runserver
For running the tests you can execute:
py.test hackernews
Deploying on Heroku
To get your own Hackernews running on Heroku, click the button below:
Fill out the form, and you should be cooking with gas in a few seconds.
This are the commands executed for creating the skeleton of this project
mkvirtualenv howtowgraphene
pip install Django
django-admin startproject hackernews
# Add basic app
python manage.py startapp links
python manage.py startapp users