Scrump31 / laptop-store

A full-stack app that allows users to see a list of laptops and view further details.

Home Page:https://whispering-savannah-49277.herokuapp.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Laptop-Store

app Screenshot

app Screenshot

Overview

This project is a full-stack NodeJS app created using pre-built static HTML and CSS files (thanks Jonas Schmedtmann!). An API was created to pull data from a Postgres database to be consumed by the frontend. A user can view a list of popular laptops and click to see more details. Also, a user can click the "Buy Now" link to open a Google search result page for that product.

Commitizen friendly

Getting Started

  1. clone the repo and npm install to install server dependencies.
  2. Create a postgres database with a table named laptops and use the following structure for the table:
id integer NOT NULL AUTO INCREMENT,
productname character varying(255),
image character varying(100),
cpu character varying(255),
ram character varying(255),
storage character varying(255),
screen character varying(255),
price smallint,
description text
PRIMARY KEY (id)
  1. Create a .env file in the root of the project and add relevant database values and port number for your server for the following properties:
 PORT=
 DB_HOST=
 DB_USER=
 DB_PASS=
 DB=
  1. npm start to start up the server
  2. In another terminal window, cd frontend && npm install
  3. npm start to start the React server

Note: the React frontend is able to connect with the Express backend via the proxy script included in the frontend package.json file. Be sure to update this value with the port number specified in your .env

  1. Now that both the frontend and backend servers are up and running you should now be able to view the app in your browser and have fun!

Technologies Used To Create The Project

About

A full-stack app that allows users to see a list of laptops and view further details.

https://whispering-savannah-49277.herokuapp.com/


Languages

Language:JavaScript 58.8%Language:CSS 34.3%Language:HTML 6.9%Language:Procfile 0.1%