howtographql / graphene

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to Graphene - Hacker News

This repo aims to showcase how to create a simple Hacker News clone with Django and GraphQL. Demo

Install

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

Running Tests

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:

Deploy

Fill out the form, and you should be cooking with gas in a few seconds.

Commands executed

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

About

License:MIT License


Languages

Language:Python 100.0%