Overview: There are two applications, client
and server
.
The client
uses GatsbyJS and the server
uses Django.
Prerequisite: Make sure you have either npm
or yarn
installed.
In your terminal, run:
1. npm install gatsby-cli
or yarn add gatsby-cli
2. cd client
3. gatsby develop
For more help, go to the quick start for Gatsby.
Once its running, go to localhost:8000 in your browser and you should see an application. Check out this link to see a slightly better design.
Prerequisite: Make sure you have python3
installed.
In your terminal:
1. Pull the project on your local.
2. cd
into the project folder and run python3 -m venv
to create a virtual environment.
2. To start the virtual environment run source venv/bin/activate
Prerequisite: Have the virtual environment running and be in the project folder.
In your terminal, run: pip install -r requirements.txt
This installs all of the packages needed to run the server application.
In your terminal (& in the same folder as before), run:
1. python manage.py runserver
The project should be running on port 23456
and callable via localhost
.
To test this, I used cURL
. Here's an example:
curl -d '{"Shift":3, "Message":"dad is a test"}' -H "Content-Type: application/json" -X POST http://localhost:23456/api/encode/
.
NOTE: There will be a message about running migrations in the terminal. It adds authentication to the application, so please, avoid it if you can.