-
Notifications
You must be signed in to change notification settings - Fork 15
Setup and usage for backend development
Julian Lioanag edited this page Oct 9, 2020
·
2 revisions
- Install npm (which is installed in addition to Node.js): https://nodejs.org/en/.
- Go into
functionsdirectory in the smartrider repository and runnpm install ..- This installs node-gtfs.
- Install TypeScript with npm:
npm install typescript. - Install Firebase CLI reference with npm:
npm install -g firebase-tools. - Install Talend API Tester chrome extension.
- We use this to test cloud functions on your personal machine.
- Run
npx tscto compile Typescript to JavaScript. - Run
firebase emulators:start --only functionsto start the emulator. - Click on the Talend API chrome extension and paste the appropriate localhost URL from the emulator.
- Example in the command prompt:
+ functions[helloWorld]: http function initialized (http://localhost:5001/smartrider-4e9e8/us-central1/helloWorld). - If you want to just look at the raw JSON just open that localhost URL on a web browser.
- Example in the command prompt:
- Click
Sendto send a request locally.- 200 means it worked; 500 means ERROR.