This is probably the best template that I've seen so far for making an easy to use app in nodejs.

It uses Alby to handle the lightning payment processing. You only need to setup a lightning address with them and provide it to the app. The rest is all taken care of, authentication, payments, and qr-code generation.

It's great!

Glad you like it! 👌

Dope! We need more turn-key tooling to help devs integrate lightning (ESPECIALLY devs who are not bitcoin experts). Thanks for sharing!

For someone who doesn't have experience making apps (but has experience coding in python and fortran), what would be your recommendation to take this template and make something useful out of it? What prerequisites would be needed to deploy something from nearly scratch all the way to the end? Plenty of ideas on what my app could be about...

This project uses JavaScript and the Express.js web framework. You'd use yarn.js to run the project and install additional packages. It does server side rendering of HTML templates (.ejs files), of course styles are CSS.

Ok, thanks! I'll check out the different keywords you gave me there and see how I can get up to speed...

You only need to do the following after you download the code (or git clone it)

npm install #(to install the dependencies) npm start #(to compile and run the server)

now the app is running at port 3000, so simply open a website at localhost:3000 or at your ip:3000

To be able to run those commands you need to have nodejs installed. Also git for easier download.

So, the whole thing is:

git clone https://github.com/reneaaron/lapp-template cd lapp-template npm install npm start

Now your app is live at your_ip:3000

Thanks. I've done everything, except when i type npm start, I'm getting

1You need to configure your environment variables first. Check out the README file!

However, I've put my getalby address in the .env file (without any spaces around the = character). I've even restarted the terminal in case something has to be sourced like for .bashrc files.

Looks like it's not reading the .env file.

Add this in the beginning of src/server/server.js

const { config } = require('dotenv');

and this just before // Validate configuration

config();

Great, it works now.

FYI, I had to kill a docker process locking port 3000 before it did (using kill -9 $(lsof -ti:3000)).

Will try experimenting a bit with it all now

Alby login throws Network Error, but that's probably outside of this app's control. Anyhow, can confirm it looks like a neat template to start building on. Good job!

0 sats \ 0 replies \ @mf 22 Sep

This is awesome!