Django server to support frontend Next.js application
- Enter
pipenv shell - Install dependencies with
pipenv install - Create a database with Postgres
psqlthencreatedb "db-name"
- Create a superuser for your database
CREATE USER admin;ALTER USER admin WITH SUPERUSER;
- Create a
.envfile with the following propertiesENVwith "development" or "production"- If this does not exist, server will assume a development environment
SECRETwith literally anythingDB_NAME_PROD&DB_NAME_PRODwith relevant database nameDB_USER_NAMEwith a database user with accessDB_USER_PASSwith the password forDB_USER_NAME
- Apply existing migrations
python3 manage.py migrate - Create a superuser with
python manage.py createsuperuser - Run server with
python3 manage.py runserver