lhcavalcanti / anota-server

Server for Anota, an application for automatic lists.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

anota-server

Server for Anota, an application for creating automatic lists.

Prerquisites

  1. Install the latest Node.JS
  2. Install the npm

Installing Firebase

To install:

  1. Go to the the git project folder
  2. npm install firebase-functions@latest firebase-admin@latest --save
  3. npm install -g firebase-tools
  4. Go to the the functions folder
  5. Type: npm install

Configuring project:

  1. On terminal type: firebase login
  2. Follow the steps to login on firebase (with your firenase account)
  3. Go to the project folder.
  4. Type: firebase init
  5. Do not overwrite the files.
  6. Select Functions and Database.

Coding and Testing

  1. The functions are coded on functions/index.js
  2. To teste you can type: firebase serve This is faster, and run the functions locally, this prevent from erros that can charge $_$
  3. The terminal will show an URL HTTP that you need to use for testing, example: http://localhost:5000/anota-backend/us-central1/addList?uid=12345&link=http://nfce...
  4. After testing everything you can deploy by: firebase deploy.
  5. The terminal will also print an URL HTTP that you need to use for acessing the functions on the Firebase, example: https://us-central1-anota-backend.cloudfunctions.net/addList?uid=12345&link=http://nfce...

Examples of Firebase Functions

Firebase Functions Documentation

About

Server for Anota, an application for automatic lists.


Languages

Language:JavaScript 100.0%