Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
906fee6
commit 0e85d89
Showing
4 changed files
with
47 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
|
||
## IMPORANT! Set the password for the database in this environment variable | ||
## It is used by the app and by the ./create_database.sh | ||
|
||
export OMG_DB_PW=password_here | ||
|
||
## IMPORTANT! This requires Postgresql 9.4 or later! | ||
## This will install Postgresql if there isn't a version installed | ||
## But you should check to see if it's 9.4 or later | ||
|
||
which psql | ||
if [ "$?" -gt "0" ]; then | ||
./install_database.sh | ||
else | ||
echo "Postgresql is installed. Hopefully 9.4 or later!" | ||
fi | ||
|
||
# Now we can create our database with the password in OMG_DB_PW | ||
|
||
./create_database.sh | ||
|
||
# This will install all the node modules for the project | ||
|
||
npm init | ||
|
||
# And now we're good to go! | ||
|
||
node main.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#installs postgresql-9.5 | ||
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ `lsb_release -cs`-pgdg main" >> /etc/apt/sources.list.d/pgdg.list' | ||
wget -q https://www.postgresql.org/media/keys/ACCC4CF8.asc -O - | sudo apt-key add - | ||
sudo apt-get update | ||
sudo apt-get install postgresql postgresql-contrib | ||
|
||
|