Code Monkey home page Code Monkey logo

django3realtimetaxi's Introduction

https://coursehunters.online/t/testdriven-io-developing-a-real-time-taxi-app-with-django-channels-and-react-pt-1/3301

https://github.com/testdrivenio/taxi-react-app

REDIS

On notebook:

`C:\Temp\redis-2.4.5-win32-win64\64bit`

Postgres

Create a new database and user with the following commands:

su postgres
createdb -U postgres
psql -U postgres
<WHAT EVER NAME> =# CREATE USER taxi WITH SUPERUSER CREATEDB CREATEROLE PASSWORD 'taxi';
<WHAT EVER NAME> =# CREATE DATABASE taxi OWNER taxi;
dropdb taxi
psql -f taxi.sql
pg_dump taxi > taxi.bak

In my case

taxi > taxi_app
trips > trips

URLs

Django

http://localhost:8001/api/sign_up/
http://localhost:8001/api/log_in/

URLs

http://localhost:8080/#/
http://localhost:8080/#/log-in/
http://localhost:8080/#/sign-up/
http://localhost:8080/api/sign_up/
http://localhost:8080/api/log_in/
http://localhost:8080/admin/

React

http://localhost:3001
http://localhost:3001/#/log-in
http://localhost:3001/#/sign-up

React Setup

cd taxi-app
npx create-react-app client
cd client
npm start

Cypress

npm install cypress --save-dev
npm uninstall cypress --save-dev
npx cypress open
npx cypress run --spec cypress/integration/authentication.spec.js

Docker

  • FROM: tells Docker what base image to use as a starting point.
  • RUN: executes commands inside the container.
  • WORKDIR: changes the active directory.
  • USER: changes the active user for the rest of the commands.
  • EXPOSE: tells Docker which ports should be mapped outside the container.
  • CMD: defines the command to run when the container starts.

docker rmi $(docker images -a -q)
docker rmi $(docker images -a | grep none | awk '{ print $3; }'
docker-compose up -d
docker-compose down
docker-compose down && docker-compose up -d
docker-compose down && docker-compose up -d --build
docker-compose down && docker-compose build taxi-server
docker-compose up -d --build

docker build . -t taxi-server:latest
docker build . -t taxi-database:latest
docker build . -t taxi-client
docker build -f Dockerfile.client . -t igorzna/taxi-client
docker build -f Dockerfile.cypress . -t django3realtimetaxi_taxi-cypress
docker run -d
docker images
docker run -it -d sample:dev -p 3001:3000
docker run -it -d igorzna/taxi-client:latest
docker-compose restart <SERVICE_NAME>

Windows

mklink "symbol_linked_db.sqlite3" "..\server\taxi\db.sqlite3"

django3realtimetaxi's People

Contributors

igorzn avatar

Watchers

James Cloos 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.