Coder Social home page Coder Social logo

jameslk / django-react-webpack-typescript-docker Goto Github PK

View Code? Open in Web Editor NEW
1.0 3.0 0.0 90 KB

A barebones template of Django React Webpack TypeScript Docker

License: MIT License

Python 12.42% HTML 1.56% TypeScript 1.08% JavaScript 7.02% CSS 77.92%

django-react-webpack-typescript-docker's Introduction

Django React Webpack TypeScript Docker Template

This is a barebones mashup of Django, frontend tools and Docker. This application runs inside a Docker container and displays a "Hello world!" using a React component. It is meant to be a starting point for future applications using these technologies. Here's the full list of frameworks and libraries used:

  • Python 3.6
  • Django 1.11
  • Docker
  • Postgres (running inside Docker)
  • React 15
  • Babel / ES2015-17
  • TypeScript 2.4
  • Webpack 3
  • Sass
  • Bootstrap 4

I followed these guides to set this up:

Quickstart: Compose and Django:

https://docs.docker.com/compose/django/

Using React with Django, with a little help from Webpack:

http://geezhawk.github.io/using-react-with-django-rest-framework

Reconciling Django Templates with React Components:

https://hackernoon.com/reconciling-djangos-mvc-templates-with-react-components-3aa986cf510a

React & Webpack:

https://www.typescriptlang.org/docs/handbook/react-&-webpack.html

To use, first install these requirements

  • pyenv
  • nvm
  • yarn
  • Docker

Running

# Terminal 1
docker-compose up

# Terminal 2
nvm use # This will use the Node version specified by .nvmrc
yarn install
yarn run watch

Building outside Docker:

pyenv install 3.6.0
pyenv shell 3.6.0
pip install -r requirements.txt

Development

Installing JavaScript dependencies

yarn add <dependency>

Locking Python dependencies

Dependencies should be locked down with pip-tools. Example usage:

pip install <dependency>
echo '<dependency>' >> requirements.in
pip-compile

django-react-webpack-typescript-docker's People

Contributors

jameslk avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.