Giter Club home page Giter Club logo

photogallery's Introduction

React Photo Gallery

Source code for react/node photo gallery app

Setup a cloundinary account

You'll need to create a cloudinary account https://cloudinary.com/users/register/free - there is a free tier.

Start the server

  • Clone the repo
  • In the api folder, create a new file called .env. In here, add your cloudinary connection details e.g:

API_KEY={YOUR_API_KEY}
CLOUD_NAME={YOUR_CLOUD_NAME}
API_SECRET={YOUR_API_SECRET}

  • You can get this from your cloudinary dashboard after signing up. **Avoid checking these details in to a public repo - this is effectively your username and password so keep em safe! :) **

  • Open a terminal and run the following from the API folder:


npm install
npm run server

  • You can check to make sure it is working by going to localhost:7000/photos in Postman or Chrome
    • IF getting a 501 error, make sure the .env file has been saved & attempt to restart the server and hit the localhost endpoint in postman again

Run the Frontend

NOTE: Make sure the Node server (in the API folder) is started otherwise the frontend won't work.

  • Clone the repo
  • In the client folder, create a new file called .env. In here, add an environment variable to point to the local node.js server e.g:

REACT_APP_API_URL=http://localhost:7000

  • If you change the port the node server runs on for whatever reason make sure to change it here too

  • Open a terminal and run the following from the CLIENT folder:


npm install
npm start

  • The app should be running on localhost:3000

photogallery's People

Contributors

bethanyann 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.