-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
39 lines (25 loc) · 796 Bytes
/
Copy pathsetup.sh
File metadata and controls
39 lines (25 loc) · 796 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#this is the main setup script that trigger other all relevant scripts
# $BASE_DIR is the root directory of the repo
export BASE_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )/" && pwd )
export APP_DIR="$BASE_DIR/Lottery/"
apt-get update
apt-get upgrade -y
#install some great software
apt-get install -y htop
#install Node Version Manager and NodeJS
source $BASE_DIR/Server_setup/node_setup.sh
#use nodejs without Close and reopen your terminal
export NVM_DIR="/root/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"
#set the system timezone
echo 'America/New_York' > /etc/timezone
rm /etc/localtime
cp /usr/share/zoneinfo/US/Eastern /etc/localtime
#use it instantly
export TZ=America/New_York
pushd $APP_DIR
#install node dependencies
npm install
#start the app
npm start
popd