Giter VIP home page Giter VIP logo

ece444-f2022-lab1's Introduction

ECE444-F2022-Lab3

Shashwat Panwar

(The lab3 branch is currently the default, view lab1 here)

Lab3 - activity 2

alttext

Lab3 - activity 3

alttextab

Lab3 - activity 4

Education_Pathways

This is a modified version of the previous Assignment1 template.

The deploye version can be found at https://lab3-docker.herokuapp.com.

Changes

  • Removed hardcodes of backend urls.
  • Removed hardcodes of database, and replace the database with dummy static data.

How to run it locally

  • Enter the repo directory
  • Create a virtual environment if you haven't done this before. Activate it.
# Windows
py -3 -m venv venv
venv\Scripts\activate

# For Mac and Linux, please check the link: https://flask.palletsprojects.com/en/2.2.x/installation/
  • Install dependencies (if you haven't done this before).
pip install -r requirements.txt
  • Enter the Education_Pathways/ directory, run the backend
flask --app index --debug run
  • Enter the Education_Pathways/frontend/ directory
  • Make sure the baseURL is set as localhost:5000
# Education_Pathways/frontend/src/api.js
export default axios.create({
   baseURL: "http://localhost:5000/"
});
// Part of Education_Pathways\frontend\package.json
"private": true,
"proxy": "http://localhost:5000/",
  • Build and run the frontend:
npm run build
npm start
  • Then you will see the application at localhost:3000

Build and run with Docker

For detailed instructions on Docker, please refer to the documents for Lab3 on Quercus.

// Part of Education_Pathways/frontend/package.json
"private": true,
"proxy": "http://host.docker.internal:5000/",
# Under the root directory
docker compose up --build

How to deploy (not required for lab3)

Please make sure everything works well before you run it with docker.

  • Make sure the baseURL is set as [URL to your deployed project]
// Education_Pathways/frontend/src/api.js
export default axios.create({
   baseURL: "[URL to your deployed project]" -- baseURL for deployment
});
  • Re-build the frontend to update the baseURL
# Under the frontend/ directory
npm run build
  • Deploy your changes to heroku
git push heroku main

b27eb9c45c4749e266bafdb6cff7ff2ebc70ab9b

ece444-f2022-lab1's People

Contributors

enmeng-liu avatar shashpanwar avatar jys-sun avatar arjunsridharkumar avatar yunhaom94 avatar 0x0xnull avatar

Watchers

 avatar

ece444-f2022-lab1's Issues

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.