How to Install Groceri.es on OpenSUSE
Groceri.es is an online grocery ordering and delivery system. Here is a simple guide on how to install it on the latest version of OpenSUSE.
Step 1 - Install Dependencies
The first step is to install the required dependencies for Groceri.es. For OpenSUSE, you can use the following command to install them:
sudo zypper install -y git make gcc g++ postgresql-client
Step 2 - Clone Groceri.es
Next, you need to clone the Groceri.es repository using the following command:
git clone https://github.com/GroceriDotEs/groceri.es.git
Step 3 - Install Node.js
Groceri.es requires Node.js to be installed on your system. You can use the following commands to install it:
curl -sL https://rpm.nodesource.com/setup_16.x | sudo -E bash -sudo zypper install -y nodejs
Step 4 - Configure PostgreSQL
Groceri.es uses PostgreSQL as its database. You need to create a new database and a user for Groceri.es. You can use the following commands to achieve it:
sudo systemctl start postgresql
sudo -i -u postgres
createuser -P -s -e groceri_db_user
createdb -O groceri_db_user groceri
Step 5 - Configure Groceri.es
You need to configure Groceri.es to use PostgreSQL by setting the database URL in the configuration file. Open the file using your favorite text editor and find the following line:
DATABASE_URL=sqlite://:memory:
Replace it with the following line:
DATABASE_URL=postgresql://groceri_db_user:YOUR_PASSWORD@localhost:5432/groceri
For "YOUR_PASSWORD", you can use the password that you set for the "groceri_db_user" during the PostgreSQL setup.
Step 6 - Install Required Packages
You also need to install the required packages for Groceri.es using the following command:
cd groceri.esnpm install
Step 7 - Start The Application
Finally, you can start Groceri.es using the following command:
npm start
Step 8 - Access The Application
Groceri.es should now start running and be accessible from your browser at http://localhost:3000/
Congratulations! You have successfully installed Groceri.es on OpenSUSE!