Skip to content
Antonio Vivace edited this page Mar 10, 2021 · 6 revisions

Requisites: node, mongodb

apt install git curl gnupg2
curl -fsSL https://deb.nodesource.com/setup_15.x | bash -
apt-get install -y nodejs

wget -qO - https://www.mongodb.org/static/pgp/server-4.4.asc | sudo apt-key add -
echo "deb http://repo.mongodb.org/apt/debian buster/mongodb-org/4.4 main" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.4.list
sudo apt-get install -y mongodb-org

Clone the repo

git clone --recursive https://github.com/dmg01/homebrewhub

Edit the configuration

  • config/database.js mongodb instance details
module.exports = {
    'url' : 'mongodb://localhost:27018/database'
};
  • config/email.js SMTP email server configuration
module.exports = {
    // Email
    'host' : '',
    'port' : 465,
    'secure' : true,
    'user' : '',
    'pass' : '',
    'domain' : "",
    'sender' : '"HomebrewHub" <[email protected]>',
};

Start mongodb server

cd homebrewhub
mkdir db
mongod --dbpath=db --port 27018

You can use the --smallfiles startup option when starting MongoDB to limit the size of the journal files to 128MB

Node things

cd homebrewhub
npm install

JSON database <--> Mongo Synchronization

node sync.js

Start the app

npm start

Your instance is live at localhost:8080/

Clone this wiki locally