This project was bootstrapped with Create React App.
In the project directory, you can run:
Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.
The page will reload if you make edits.
You will also see any lint errors in the console.
Launches the test runner in the interactive watch mode.
See the section about running tests for more information.
- node.js v10.15.0
- firebase v6.5.0
Clone the repository to your desktop using git clone or downloading ZIP
$ git clone https://github.com/cs394-w19/upcycle-floral.git [your-local-directory]
Once you have downloaded nodejs and set up the repository, cd into your folder and then run 'npm install'
$ cd upcycle-floral
$ npm install
In our case we wil build and deploy our app on firebase.
- Go to firebase website and sign up using Google account
- Go to [firebase console](firebase website](https://firebase.google.com/)) and Add project.
- Project name can be anything and create project. In our case, we are using "abcde-c998a"
- Go back to your terminal and run the following to install firebase globally and initialize firebase:
$ npm install -g firebase-tools
$ firebase init
- Then select Database, Hosting, and Storage using spacebar and choose the project "abcde-c998a"
- Open up database.rules.json and edit
{
"rules": {
".read": "auth != true",
".write": "auth != true"
}
}
- Then, your terminal will ask "What do you want to use as your public directory? (public)". Type "build"
- Open another terminal window and do
$ npm run build
- Go back to your original terminal where we were setting up firebase. Press enter.
- Type 'y' and press enter to 'configured as a single-page app'
- Type 'N'to "File build/index.html already exists. Overwrite?"
- Run the following
$ firebase deploy
We have a continuous integration add on called Travis that automatically deploys our code to firebase.
Go to https://travis-ci.org/ , sign into your github account and then enable travis for your new upcycle floral repository.
Then, in your .travis.yml file replace the value in the secure line with the encrypted API key to your firebase!
secure: <YOUR ENCRYPTED API KEY>
After this, make a commit and check to see whether Travis shows you any errors!
At the moment, the app doesn't update based on live data from firebase. Although, it does push data up to the database every time the user creates a listing.