This is an example project featuring the use of nodejs, vuejs and postgresql in the same project
- Nodejs/npm/pm2
- Postgresql
If you are running on any ubuntu variants, you can run this to get things started quickly
echo "Installing Nodejs"
sudo apt-get install nodejs -y
sudo ln -s "$(which nodejs)" /usr/bin/node
sudo apt-get install npm -y
echo "Upgrade nodejs"
sudo npm install n -g
sudo n stable
echo "Installing Postgres"
sudo apt-get install postgresql postgresql-contrib
For windows, install following executables
Installing postgresql on windows
For macos, get brew and execute following commands
brew install node
brew install postgresql
Then upgrade nodejs and install the dependencies
npm install n -g
n stable
npm install -g pm2
Before running the code, we need to setup postgtesql and append the postgresql details in server/config/config.json
Open up the psql console and run the following command
CREATE USER user WITH PASSWORD 'secret';
CREATE DATABASE development;
GRANT ALL PRIVILEGES ON DATABASE development TO user;
then modify the config.json DATABASE_URI params with the following (assuming using development environment)
"development": {
"PORT": 3000,
"DATABASE_URI": "postgres://user:secret@localhost:5432/development"
},
Simply run following commands on the root folder to start
npm install
npm start
- Added support for Webpack4, ESLint and Babel 7
- Cleaned code and structure