Skip to content

Instantly share code, notes, and snippets.

@genomics-geek
genomics-geek / README.md
Last active January 10, 2024 15:27
Setting up a Dockerized web application with Django REST APIs, ReactJS with Redux pattern, and Webpack Hot Reloading! Mouthful.

Guide on how to create and set up a Dockerized web app using Django REST APIs and ReactJS

Hopefully this will answer "How do I setup or start a Django project using REST Framework and ReactJS?"

This is a guide to show you step by step how this can be setup. If you just want to get started, use the cookiecuter I set up cookiecutter-django-reactjs. It basically is a fork of pydanny's cookiecutter, just added the front-end stuff :).

I created this because it was SUCH a pain in the ass setting up a project using all the latest technologies. After some research, I figured it out and have it working. The repo that implements this is located here. Feel free to use it as a boilerplate ;)

Main features:

  • Django REST APIs
@pdib
pdib / .ebextensions\deploy.config
Last active April 5, 2022 07:39
Installing node and npm on a Django AWS ElasticBeanstalk
# This specifies the deployment process on AWS ElasticBeanstalk for a Django app using npm and Postgres.
#
# The target environment should have access to a Postgres Database through environment variables.
# The environment can be setup using `eb create --database.engine=postgres`
# The necessary environment variables to access the database will be automatically defined on the
# instances of that environment.
#
# In addition, the target environment should define environment variables (django secret key ...).
# They can be manually defined using the AWS ElasticBeanstalk interface on the web.
# They can also be specified when creating the environment from command line, for example:
<link href="/static/css/select2.css" type="text/css" media="screen" rel="stylesheet" />
<script type="text/javascript" src="/static/js/select2.js"></script>
<script type="text/javascript">
$(function () {
select2Options = {
'width': 'resolve',
}
$("#content-main select:not(.select2-offscreen)").select2(select2Options);