Skip to content

There are many improvements that can be made to residence halls, whether in regards to their efficiency, community building, amenities, involvement in campus, the physical building, or experience of its residents. Develop an improvement that can be made to the Towers and pitch how it can be implemented.

Notifications You must be signed in to change notification settings

Special-Team-7/Resident-CCNY

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Stack

API

  • express.js
  • sequelize.js

React client

  • Built using create-react-app and configured to work with the api.
  • Bootstrap 4.x added to /client/public/index.html
  • React Router

Dev Setup

Each team member will need to do this on their local machine.

Create a postgres db

Create a user in postgres named residentccny with the password ccnypassword:

This only needs to be done one time on your machine You can create additional users if you want to.

createuser -P -s -e residentccny

Create a separate db for this project:

createdb -h localhost -U residentccny residentccny_development

You will create a DB for each project you start based on this repo. For other projects change residentccny_development to the new apps database name.

For more details see this installing postgres guide

Running the app

For local development you will need two terminals open, one for the api-backend and another for the react-client.

Clone this app, then:

# api-backend terminal 1
cp .env.example .env
npm install
npm run dev
# react-client terminal 2
cd client
npm install
npm start

In production you will only deploy a single app. The react client will build into static files that will be served from the backend.

Deployment

Setting up Heroku

Install the heroku cli if you don't already have it.

You will also need a heroku account And this will only be done once on your machine

# on mac
brew install heroku/brew/heroku
heroku login

Create a Heroku project

Next, cd into this project directory and create a project:

heroku create cool-appname
heroku addons:create heroku-postgresql:hobby-dev

This will deploy your apps to https://cool-appname.herokuapp.com, assuming that it is not taken already.

You only need to do this once per app

Deploying the app

Whenever you want to update the app run this command.

git push heroku master

This command deploys your master branch. You can change that and deploy a different branch such as: git push heroku development

About

There are many improvements that can be made to residence halls, whether in regards to their efficiency, community building, amenities, involvement in campus, the physical building, or experience of its residents. Develop an improvement that can be made to the Towers and pitch how it can be implemented.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published