Skip to content

raynelfss/get-bookd

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Get Book'd

Setting Up Development Environment

Web Client

This tutorial assumes that you have fulfilled the following pre-requisites:

  • Node.js version 12.2.0 or higher installed on your machine
cd client
npm install
npm run dev

That should be sufficient. After running npm run dev, you should see the following on your screen:

$ npm run dev
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.

> [email protected] dev
> vite


  VITE v4.3.3  ready in 365 ms

  ➜  Local:   http://127.0.0.1:5173/
  ➜  Network: use --host to expose
  ➜  press h to show help

Just click the link at local host to be redirected. This application uses vite, so the project should be able to load up almost instantly.

Server

Setup

  1. Change to the server directory

    cd server
  2. Install virtualenv on your system.

    Unix/macOS

    python3 -m pip install --user virtualenv

    Windows

    Before starting, you may need to add python as an environment variable to PATH on your system.

    python -m ensurepip
    py -m pip install --user virtualenv
  3. Create the virtual environment

    virutalenv env
  4. Run the virtual environment in your system.

    Unix/macOS

    source env/bin/activate

    Windows

    .\env\Scripts\activate

    If the environment doesn't get activated, open powershell as adminstrator and run the following command first:

    Set-ExecutionPolicy RemoteSigned
  5. Install the packages in requirements.txt.

    pip install -r requirements.txt
  6. create a .env file within server/

    cp .env.example .env
  7. Run secret_key.py to get Django secret key

    python scripts/secret_key.py
  8. Enter the Django secret_key in the .env file you created.

    SECRET_KEY="<Your secret key>"
  9. Set up and migrate the database.

    Prior to running these commands, make sure that your project Environment Variables are set up

    python manage.py makemigrations
    python manage.py migrate
  10. Create a superuser (Owner Account)

    python manage.py createsuperuser

Run Server

Run the following command to run the server

python manage.py runserver

FAQ

  • How would you flush the database?

    Go into the server directory and run the following command.

    python manage.py flush
  • How can I fully reset the database if I'm having issues with makemigrations and migrate?

    1. Delete the db.sqlite3 file inside the server folder.

    2. Run makemigrations and migrate.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 66.2%
  • Python 33.5%
  • Other 0.3%