/sitemach

Industrial machines info repositiry

Primary LanguageCSS

Single page application on Django with React and Rest Framework

Full stack Django/React/Redux app that uses token based authentication with Knox.

Usage on Django, React Js & Rest API

Setup virtualenv (not required)

mkvirtualenv myenv

Install dependencies

pip install -r requirements.txt
npm install

Set up PostgreSQL and add configurations into a hidden file .env DATABASE_URL=postgres://NAME:PASS@localhost:/DBNAME

Django migrate, create admin user

python manage.py migrate
python manage.py createsuperuser

Run django server, serve API on 127.0.0.1:8000

python manage.py runserver

Login to Django Admin

http://127.0.0.1:8000/control/

Build frontend and collect static files

npm run build
python manage.py collectstatic

Or run webpack server in dev mode

# Run webpack (from root)
npm run dev

Open the site

http://127.0.0.1:8000/