This repo. builds a simple web app using the following technologies:
- Two front-ends for you to choose from:
- Next.js with TypeScript and Tailwind
- React.js (a barebones implementation)
- Django REST
- Docker (with
docker-compose
)
- Clone this repo:
git clone https://github.com/ntlind/nextjs-django-docker-starter && cd nextjs-django-docker-starter
- Create and modify your
.env
file:cp .env.example .env
- Run docker:
docker-compose up --build
- Handle migrations:
./run manage migrate
- Navigate to pages (defaults shown below):
- Django REST:
http://localhost:8000/char_count/
- Next.js:
http://localhost:3000/
- React:
http://localhost:3001/
- Django REST:
- Delete the frontend you don't want by removing it from
docker-compose.yaml
and cleaning your.env
file. - Run backend tests (if desired):
./run manage test