Skip to content

⚡ The API that's running behind the scenes and powering Liquid Galaxy applications.

License

Notifications You must be signed in to change notification settings

LiquidGalaxyLAB/liquid-galaxy-api

Repository files navigation

Liquid Galaxy API

The API that's running behind the Liquid Galaxy scenes and powering its applications.

Build Status David David Coverage Status Code Climate

Liquid Galaxy quickstart

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).

Manual installation

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.

Troubleshooting (16.04 Lts)

While running the script if you face issues follow the guide below

Sudo/Local Node version

  1. 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
  2. If you get the error

    node: /lib/x86_64-linux-gnu/libm.so.6: version `glibc_2.27' not found (required by node)

    Solution

    1. 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"

Pm2 Version Mismatch

  1. 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

  1. 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

License

MIT © Gerard Rovira Sánchez

About

⚡ The API that's running behind the scenes and powering Liquid Galaxy applications.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •