DiBid is an online auction application
https://github.com/users/vmarkop/projects/1/views/1
The following are required to set up and deploy the full stack application. You can skip anything that you already have on your computer.
- Git
Check if git version control is installed in your machine using
git version.
If it is not installed, simply use
sudo apt install git-all.
- MySQL Server
Check if mysql is already installed in your machine using
systemctl status mysql.service
If it is not installed, follow the instructions below
2.1. Install mysql using
sudo apt install mysql-server
2.2. Ensure that the server is running using
sudo systemctl start mysql.service
2.3. Run mysql as root (this may vary if you already have a root account)
sudo mysql
You will now enter the mysql console.
2.4. Create a new database
CREATE DATABASE dibid;
2.5. Create a dedicated user
CREATE USER 'dibid'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';
Please use a secure password instead of just 'password'.
2.6. Grant privileges to our user on our database
GRANT ALL PRIVILEGES ON dibid.* TO 'dibid'@'localhost';
FLUSH PRIVILEGES;
Now, we have created a fresh 'dibid' database, and a fresh 'dibid' user, with an appropriate password and full privileges on the dibid database. This will make it easier to follow the ormconfig instructions later.
- npm
Check if npm is already installed in your machine using
npm -version
npm install -g npm
- mkcert
Install mkcert
sudo apt-get install wget libnss3-tools -y
wget https://github.com/FiloSottile/mkcert/releases/download/v1.4.3/mkcert-v1.4.3-linux-amd64
sudo mv mkcert-v1.4.3-linux-amd64 /usr/bin/mkcert
sudo chmod +x /usr/bin/mkcert
mkcert -install
Open your installation location on a terminal. eg /home/billy/Projects
- Clone the repository locally:
git clone https://github.com/vmarkop/dibid.git
- Move to the repository folder:
cd dibid
- Initialize the database
cat db/init/*.sql | mysql -u dibid -p
This prompts you to insert the password for the dibid user we previously created.
Then, the Admin user is created, and the Countries and Categories are initialized in the database.
- Create the local certificates for SSL
mkcert localhost
- Setup and run backend
cd backend
Install dependencies
npm i
Change the password on ormconfig.json to the secure password you used for user 'dibid'.
npm run start
- Setup and run frontend
cd ../frontend
Install dependencies
npm i
to start on https mode, use:
npm run https
The full stack is now ready to go!
Visit https://localhost:3000 to get started.