Giter VIP home page Giter VIP logo

nchc's Introduction

Project Screenshot

S1

image

Picture1000

!! please follow these steps to successfully run this project in your Windows Device !!

Getting Started for Windows

Make Sure all these are installed in your window device

Setting Up Project

  • Download the Project File and Extract it using 7Zip.
  • Make sure the main folder is "NCHC" and sub folders are "backend" and "frontend".
  • Do not rename any other existing folder except main folder to "NCHC" if needed.

Setting Up Database: PostgreSQL

  • Open pgAdmin (PostgreSQL)
  • set up your database by entering credentials.
  • Create new database named "nchc_db"

Installing Virtual Environment

  • Open Command Prompt as administrator
  • After installing python, type: "pip install virtualenv" in the command prompt

Opening Project in Visual Studio Code

  • Open Visual Studio
  • Go to the Top-Left of Visual Code and click on "File"
  • Dropdown will appear and click on Open Folder
  • New window will pop up and select the project folder "NCHC"
  • The project will open through Visual studio Code

Setting Up Virtual Environment

Opening new Terminals for frontend and backend:

  • In the VS Code, click on "Terminal" in the same bar as "File".
  • Dropdown will apear and click on New Terminal.

To create new virtual Environment:

  • Now type: "virtualenv venv" in the terminal to create new virtual environment named "venv".
  • You can see that new venv is added below the backend and frontend folder.

Setting up Backend

Changing Directories to backend and downloading the required packages

  • Type: "venv\Scripts\activate" to activate the virtual environment for backend.
  • Type: "cd backend" in the termical to change directory to backend.
  • Type: "pip install -r requirements.txt" to install all the packages listed in the requirements.txt file.

Connecting Database: Code of Database in Settings.py: DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql', 'NAME': 'nchc_db', 'USER': 'postgres', 'PASSWORD': 'abiral', 'HOST': 'localhost' } }

  • Make changes in the above code for the database in the settings.py file by changing the user and password according to your configured postgres credentials.

To Make Migration:

  • Type: "python manage.py makemigrations"

To Migrate to database:

  • Type: "python manage.py migrate"

To Run backend server:

  • Type: "python manage.py runserver"

Extra: Creating Super User/Admin:

  • Type: "python manage.py createsuperuser" and fill all the required sections to create superuser

Setting up Frontend

Changing Directories to frontend and downloading the required packages:

  • As previously explained, open new terminal.
  • Type: "venv\Scripts\activate" to activate the virtual environment for frontend.
  • In the new terminal, Type: "cd frontend" in the new terminal to change directory to frontend.
  • Type: "npm install" to install all the dependencies(packages) listed in the package.json file of the frontend.

Note: if there are error installing the packages, type: "npm install --force" to force and re-install all packages

  • After successfully installing all the packages, type: "npm start" to run the frontend server.

nchc's People

Contributors

awix002 avatar

Watchers

 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.