pull down to refresh
20 sats \ 4 replies \ @nullama OP 22 Sep 2022 \ parent \ on: Template app for making Lightning Apps⚡ with Authentication, WebLN, and QR-Code! bitcoin
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 gettingYou 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.
reply
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();
reply
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
reply
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!
reply