top of page

Firebase Database

Set Rules for read/write

Install axios

npm install --save axios

npm start

-----------------------------------------------------------------------------------

axios js file

import axios from 'axios';

const instance = axios.create({ baseURL: 'https://react-my-burger-e02f7.firebaseio.com/' });

export default instance;

-----------------------------------------------------------------------------------------------------------------------

axios Post Handler

axiosPostHandler = () => { const order ={ price: '20', customer: { name: 'Chris Speed', address: { street: 'Ok' } } } axios.post('/orders.json',order) .then(response => console.log(response)) .catch(error => console.log(error)); }

Recent Posts

See All
Creating React App

Nodejs install on Kubuntu system sudo apt install curl curl -sL https://deb.nodesource.com/setup_10.x | sudo bash - sudo apt install...

 
 
 

Comments


Contact Me

Tel: 678-642-8051

cspeed@jcsassoc.com

  • Google+ Long Shadow
  • LinkedIn Long Shadow
  • Facebook Social Icon
  • Twitter Long Shadow

© 2005 by Christopher Speed

Your details were sent successfully!

bottom of page