The API that's running behind the Liquid Galaxy scenes and powering its applications.
Install / upgrade (on the master machine only):
bash <(curl -s https://raw.githubusercontent.com/LiquidGalaxyLAB/liquid-galaxy-api/master/scripts/install.sh)
The API will be available under port 82 (proxy served by Apache). http://localhost:82
No further steps are required.
Reminder: php-interface is by default running on port 81 (also served by Apache).
Install on the master machine only!
Requirements:
Node dependencies:
npm install
Run with:
npm run start
or npm run start-dev
(debug)
You might need to create an iptables TCP exception. The API is running under port 3030 by default.
While running the script if you face issues follow the guide below
-
Check for sudo and Local node versions of node
sudo node -v
node -v
Normally you should get this version for Both
v8.xx.x
-
If you get the error
node: /lib/x86_64-linux-gnu/libm.so.6: version `glibc_2.27' not found (required by node)
Solution
- Check for which user you are getting it and then follow this tutorial to remove the NodeJS version
How can I completely uninstall nodejs, npm and node in Ubuntu
b. Then, install Node 8 using the below command
curl -sL https://deb.nodesource.com/setup_8.x | sudo bash -
sudo apt-get install -qq nodejs
c. After that install Npm
sudo apt-get install npm
d. install the script Again
bash <(curl -s [https://raw.githubusercontent.com/LiquidGalaxyLAB/liquid-galaxy-api/master/scripts/install.sh](https://raw.githubusercontent.com/LiquidGalaxyLAB/liquid-galaxy-api/master/scripts/install.sh))
e. check logs
sudo pm2 log
If you can see API listening on port 3030 , Hit http://localhost:82
[TAILING] Tailing last 15 lines for [all] processes (change the value with --lines option)
/home/lg/.pm2/pm2.log last 15 lines:
...
/home/lg/.pm2/logs/api-error.log last 15 lines:
...
0|api | WARNING: See https://github.com/lorenwest/node-config/wiki/Strict-Mode
0|api | Tue, 07 Jan 2025 21:59:20 GMT info -·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-
0|api | Tue, 07 Jan 2025 21:59:20 GMT info 🌐 API listening on port 3030
0|api | Tue, 07 Jan 2025 21:59:20 GMT info -·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-
0|api | Tue, 07 Jan 2025 21:59:24 GMT info [Firebase] Signed in as BJIvaloH1l (no password)
0|api | Tue, 07 Jan 2025 22:08:55 GMT info ::1 - - [07/Jan/2025:22:08:55 +0000] "GET / HTTP/1.1" 304 - "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"
- If you get this Error while installing the script that
Pm2 Version (In Memory) 5.3.1
Pm2 version 3.5.1
Follow this Tutorial :
Can't update(uninstall/install) pm2 version 0.7.8
Then, check below
Solution
- uninstall the version
sudo npm uninstall pm2
b. Install the 3.5.1 version
sudo npm install [email protected] -g
c. install the script Again
bash <(curl -s [https://raw.githubusercontent.com/LiquidGalaxyLAB/liquid-galaxy-api/master/scripts/install.sh](https://raw.githubusercontent.com/LiquidGalaxyLAB/liquid-galaxy-api/master/scripts/install.sh))
Follow Step “e” above
MIT © Gerard Rovira Sánchez