Git Product home page Git Product logo

Comments (17)

realjax avatar realjax commented on May 28, 2024 1

Yes, it would be a nice if we could run an instance ourselves and test things locally. I know you can set up a local.config file but it takes a whole bunch of vars that need to be set, eg:

port , oauthClientId , oauthClientSecret ,jwtCookieName ,jwtSecret , projectId,googleProjectApiKey,postgressConnectionString,serviceAccountIssuer, serviceAccountPrivateKey,userAdminUid

and it is unclear to me what these values should be or where they can be obtained..

from nora-service.

nicandris avatar nicandris commented on May 28, 2024 1

I managed to get it working on heroku, so i'll close this bug and when i have time probably write a README

from nora-service.

nicandris avatar nicandris commented on May 28, 2024 1

@realjax as promised. https://github.com/andrei-tatar/nora-service/pull/19/files?short_path=04c6e90#diff-04c6e90faac2675aa89e2176d2eec7d8

from nora-service.

realjax avatar realjax commented on May 28, 2024 1

Also, there no API key to enter here:

PROJECT_API_KEY = api console - credentials - api keys - key

edit: Solved, I just had to create one, using '+ create credentials -> API key

👍

from nora-service.

andrei-tatar avatar andrei-tatar commented on May 28, 2024

If you scroll down on this page (https://github.com/andrei-tatar/node-red-contrib-nora) there's a more detailed description.

from nora-service.

nicandris avatar nicandris commented on May 28, 2024

Hey Andrei, sorry I was in a hurry and I didn't make myself clear.

I am looking for a tutorial or a proper README on how to setup firebase and the "Nora service" to be used for local testing or to use my own firebase acc instead of yours.

I already made some changes in the nora red node (https://github.com/nicandris/node-red-contrib-nora/commit/bdc9b9b85b14a6ea275dcf9f72bf671206713ea5) so I need some kind of info on how to start the nora-service in order to do some testing and create a PR 😬 (sorry if it's obvious on how to run this, i'm not a node dev)

I supposedly did the changes to add the StartStop trait also at (https://github.com/nicandris/nora-service) but again I'm too much of a noob to test it! Any help appreciated.

from nora-service.

Atnagulova avatar Atnagulova commented on May 28, 2024

How to configure Firebase?

  1. To get started, go to the Firebase website and log in with your Google account.
    https://firebase.google.com/
  2. When you click the “Get started” button, a new page will appear. It will offer you “Add a project”. In addition, here you can see the “Project Example” to see how the data will be displayed.
  3. After you select “Add project”, a window will appear where you need to enter the name of the project and specify the country.
  4. In the next step, a page opens where you can add Firebase to your application.

from nora-service.

Atnagulova avatar Atnagulova commented on May 28, 2024

Working with FirebaseDatabase:

let database = DatabaseProvider()
database.request(.getUser(id: "1")) { result in
switch result {
case .success(let response):
let snapshot = response.snapshot
case .failure(let error):
print(error.localizedDescription)
}
}

from nora-service.

Atnagulova avatar Atnagulova commented on May 28, 2024

Database Response Decoding
Provide a JSON initializer for your custom types and easily convert the database response

let database = DatabaseProvider()
database.request(.getUser(id: "1")) { result in
switch result {
case .success(let response):
let user = try? response.mapTo(User.init)
case .failure(let error):
print(error.localizedDescription)
}
}

from nora-service.

Atnagulova avatar Atnagulova commented on May 28, 2024

Working with FirebaseStorage

let storage = StorageProvider()
let avatarData = Data()
var meta = FIRStorageMetadata?

storage.request(.upload(avatarData, meta)) { result in
switch result {
case .success(_):
print("Upload Success!")
case .failure(let error):
print(error.localizedDescription)
}
}

from nora-service.

realjax avatar realjax commented on May 28, 2024

It's a shame you closed this. Because, allthough you have got it working, it remains undocumented and unclear.

from nora-service.

nicandris avatar nicandris commented on May 28, 2024

dont worry, i'll help writing the README after i finish adding the vacuum

from nora-service.

realjax avatar realjax commented on May 28, 2024

Great, thanks!

from nora-service.

realjax avatar realjax commented on May 28, 2024

@nicandris awesome. I did get stuck on the google API's part though.
it says

  • Create a Project
  • Enable HomeGraph API
  • Under 'OAuth 2.0 Client IDs' click your webclient credentials

but this is where it runs off the track. :) there's nothing to click on there. It simply says 'No OAuth clients to display'. Any idea where to go from there ?
Did I maybe need to doe more for the HomeGraph API? Configure the oAuth consent screen maybe?

from nora-service.

nicandris avatar nicandris commented on May 28, 2024

hmmmm... i'll create a fresh project tonight and check what step i missed

from nora-service.

realjax avatar realjax commented on May 28, 2024

THAT'S IT, you are ready to deploy to Heroku! Build the app and the schema with npm run heroku-postbuild before deploying..

Also, this step leaves some stuff out I think, besides the (maybe obvious) 'npm install'..
I get a bunch of Cannot find module '../nora-common/models'. errors...

edit: oh. those are apparently in a different repo. I guess a clone of this repo didnt clone those automatically... ah well.

from nora-service.

realjax avatar realjax commented on May 28, 2024

Well, stuck again. :)

I got it all deployed at heroku bu cant login to the app, it says
Screenshot 2020-04-28 at 12 11 09

I added it to firebase of course as per the instructions,

Screenshot 2020-04-28 at 13 23 10

but it still doesnt work. Any idea's ?

edit: moved this to #21

from nora-service.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.