Building a Lightning App (Lapp) - Discussion

hey @Alko89 , where do you find the “clicking here” link??

I made an account using filip’s server, but it doesnt appear to me:

Hmm, sorry it might not be visible to non admin users. And it seems the http connection doesn’t work anymore.

Try using this link: type=clightning;server=unix://etc/clightning_bitcoin/lightning-rpc

it seems it doesn’t work either, when I test the connection, this happens:

Sorry again, seems the update introduced some changes. I have enabled non admin users to be able to connect to the node now. Can you try again? It should work now.

GREAT!

1 Like

Perfect! :raised_hands: thanks for reporting this, we have updated the connection string in the course. :slight_smile:

1 Like

@Alko89 hey, one more question: would you recommend trying to run my own node if I just got started with linux about one year ago, and I dont have any experience with dockers (I mean I have already downloaded it and tried some tutorials, but its like I have 0% experience) … nor with Node.JS (my first experience with JS was the course on the academy, I also built a react app by doing a tutorial in codecademy) but I just dont feel that confident yet with my hacker/sysadmin/whatever skills … in fact Im just an electrical engineer who dedicated to radio and then converted into a sales/marketing staff for a few dollars

I would have to run it on my laptop… would you recommend that?

First off congratulations on your transition to Linux! :smiley:

As for running your BtcPay node its quite straight forward using docker. It will be an additional challenge for sure. But if you want why go for it! I would recommend setting it up in a testnet first especially if you intend to run it on a laptop, for running a lightning node on mainnet I would recommend setting it up on a server (RPi is fine as a server) once you’re ready. Mind you will have an open channel to be able to create invoices in BtcPay.

If you have an RPi you can check out MyNode that offer an image to run all you need on it. @Fabrice from our team is using it and is quite happy with it. :slight_smile:

1 Like

Thanks man! I really appreciate your advice. I will finish the course using filip’s node, but I will try with RPi or any mini-PC … I’m already on the lookout … I was checking the ones from System76 … those guys really care about privacy starting from the hardware. I will also check out MyNode as well. Thanks a lot!!

2 Likes

Please share how this is going for you. I’m also considering different ways to mess around with my own BTCPay server. I didn’t get it to run properly on my RaspiBlitz when I tried it a few weeks ago.
I’d be happy to compare notes with you :grinning:

When I get into it, sure I will exchange notes with you … for now Im focusing on finishing the course and other issues going on with my life!

1 Like

Im also checking the solutions from this article … Im very interested in a plug and play solution, not only for myself, but also for other people

https://bitcoinmagazine.com/articles/buy-or-diy-an-overview-of-7-bitcoin-full-node-products

1 Like

Im stuck again :woozy_face: @Alko89

when trying to console.log the dollarAmount, my console doesnt show me anything… its not showing me the money!!! I was doing smoothly up until now … I already tried switching browsers (used brave, firefox and chorme). I tried catching the error also and nothing happens (when trying to create the invoice)

here is my code: index.jade


div
  h2 submit payments
  form(method='post', action='/invoice')
  p
    label Amount
    input(type='number', name='amount')
  p
    input(type='submit', name='submit')

invoice.js

router.post('/', function(req, res, next) {
  var dollarAmount = req.body.amount;
  console.log(dollarAmount);
});

Hmm, I think you’re missing indentation in your jade file between form and p. Its that kind of markup…like python :roll_eyes:

Like this:

div
  h2 submit payments
  form(method='post', action='/invoice')
    p
      label Amount
      input(type='number', name='amount')
    p
      input(type='submit', name='submit')

:slight_smile:

@Alko89 that worked just fine … its my first time with JADE :poop:

Yea tbh I don’t like it particularly. :stuck_out_tongue: Don’t know why Filip decided to use it.

channel funding seems to be taking forever

Screen Shot 2021-06-04 at 12.15.43 PM

and when I check the block explorer for the funding trx:

Screen Shot 2021-06-04 at 12.16.21 PM

what does UNCONFIRMED(RBF) mean ?

ok so it finally confirmed… but when I tried to pay a dollar to @filip’s lightning address I got errors saying “insufficient balance”.

I assumed the channel funding transaction needs only 1 confirmation before a payment can be made ? or is it that it needs more
Screen Shot 2021-06-04 at 12.28.11 PM

Screen Shot 2021-06-04 at 12.28.25 PM

yay… so I guess the channel funding needs more than 1 confirmation after all

Screen Shot 2021-06-04 at 12.55.14 PM

so this leads me to more questions about using lightning network in the real world… let’s imagine a scenario in a pub for instance…

Would we have to wait around for 30 mins at the bar for the channel to be funded (and confirmed x times) before actually ordering a nice creamy pint of guinness from the barman? I guess it would only have to be done once for that bar if the balance was big enough ?

1 Like

Not sure what you were trying to do here, but RBF is Replace By Fee, did you try to increase the fee for the tx while one was still pending?

I’m glad you made it work :raised_hands: You actually wasn’t required to actually pay the invoice (or open a channel) as long as you managed to create one. But thanks for the tip :wink:

The point of lightning network is to have the channels open as long as possible and use them for small txs as to not create clutter on the blockchain. So for someone if you want to buy a pint at the bar using the lightning network one would expect the channel to already be open and there is a known path between the wallet and the merchant. If such a path exists the tx would be basically instant.
You don’t need to close a channel once you buy your pint because the funds are basically considered yours and can continue using the channel to buy other stuff instead and only close the channel once you want to settle everything on chain. :slight_smile: