Skip to content

ryanstew95/photolabs

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

67 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-photolabs

PhotosLabs is a full stack react-app that was made by Ryan Stewart as part of the Lighthouse Labs Web Development Flex Program curriculum. photolabs

Photolabs

Setup

Install dependencies with npm install in each respective /frontend and /backend.

[Frontend] Running Webpack Development Server

cd frontend
npm start

[Backend] Running Backend Servier

Setup

Install dependencies with npm install.

Creating The DB

Use the psql -U development command to login to the PostgreSQL server with the username development and the password development. This command MUST be run in a vagrant terminal, we are using the PostgreSQL installation provided in the vagrant environment. M1/M2 and WSL2 users can execute this command in their terminal.

Create a database with the command CREATE DATABASE photolabs_development;.

Copy the .env.example file to .env.development and fill in the necessary PostgreSQL configuration. The node-postgres library uses these environment variables by default.

PGHOST=localhost
PGUSER=labber
PGDATABASE=photolabs_development
PGPASSWORD=labber
PGPORT=5432

Seeding

Run a the development server with npm start in the Host environment. We are only using vagrant for psql this week.

Both of these achieve the same result.

  • Make a GET request to /api/debug/reset with curl http://localhost:8001/api/debug/reset.
  • Use the browser to navigate to http://localhost:8001/api/debug/reset.

Run The Server

Running the server normally

npm start

Running the server so it returns an error when saving/deleting for testing the client's error handling capabilities

npm run error

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 79.5%
  • SCSS 16.7%
  • HTML 2.7%
  • CSS 1.1%