In src folder create a new file called firebase.js
This file should contain:
const apiKey = '<API KEY HERE>';
export default apiKey;
- The API key is a security feature. please replace , with our API Key between single quotes, It will be included in the email we send you!
visit this link - https://console.firebase.google.com/u/0/project/dww-iot/settings/serviceaccounts/adminsdk
Select 'generate new private key', which should download a file locally.
Move this file to this project inside the /src folder, and RENAME the file - firebase.json. <-- IMPORTANT
In the project directory, you can run:
In order to install any 3rd party project dependencies which are defined within our package.json file. npm i from TEAMP9IOT/ folder
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.
Builds the app for production to the build
folder.
It correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes.
Your app is ready to be deployed!
See the section about deployment for more information.
React JS - https://reactjs.org/ - our front end framework , built with the 'create-react-app' command to quickly create our web app.
firebase - https://firebase.google.com/ - our 'BaaS' (backend as a service) framework we are utilising mainly for authentication and real time data flow.
firestore - https://firebase.google.com/products/firestore/ - Our NoSQL google cloud database.
Contentful - https://app.contentful.com/ - blog platform!
Contentful allows you to easily create documentation pages on a web site which appear on your web app!
**** Create a contentful.js file within the src/ folder. ****
COPY AND PASTE THIS CODE INTO NEW FILE, BUT REPLACING ALL <> TAGS WITH KEYS WITHIN EMAIL!
''' const spaceId = ""; const apiKey = "";
export { spaceId, apiKey };
'''
Stages:
- Accept your contentful invitation sent to [email protected]
- Access our data-works-wales space.
- Navigate to Content.
- Navigate to 'Section', and select 'Arduino Set Up for Our Use Case'
- This page should show all documentation articles. You can add, delete, re-order your articles here.
- To add a new article, scroll to the bottom and select '+ Create article and link'.
- Select 'Publish Changes to see your new docs on the web app'
utilising googles firebase results in a serverless application,