BHCI x Solbridge Solar Dashboard
After cloning the repo to your local machine:
First step is to install the latest node modules. You can refer to download link
-
Install and Run MongoDB Server To create an account and view the dashboard we must setup the database. For more information on installation https://zellwk.com/blog/install-mongodb/
-
Install HomeBrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
- Install MongoDB
brew tap mongodb/brew
brew install mongodb-community@4.0
- Setup Permissions for Database
sudo mkdir -p /System/Volumes/Data/data/db
sudo chown -R `id -un` /System/Volumes/Data/data/db
- Run MongoDB
brew services run mongodb-community
If everything goes right, you can type
brew services list
and you will see a server running
Open terminal app. Navigate to the project root directory in the terminal. And paste the following code:
chmod a+x start_server.sh
chmod a+x start_client.sh
This changes the admin setting for the start_server.sh
and start_client.sh
files so that you can simply double click the scripts to start the project.
Now you can close the terminal, and navigate to the project directory and double click on start_server.sh
, and then start_client.sh
to start the project.
If double clicking does not work, in the terminal in the project directory, run
bash start_server.sh
and then open another terminal and run
bash start_client.sh
Inside /api
folder, delete node_modules and package-lock.json if exist (you only need to run this first time), then open terminal and run
npm install
node index.js
Likewise, inside /client
folder follow the same process and run
npm install
npm start
This should start up a browser with localhost:3000
. If nothing shows up, manually type in localhost:8000
on a internet browser.
Inside client
run
npx eslint . --fix