-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhelper.sh
executable file
·56 lines (51 loc) · 1.04 KB
/
helper.sh
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
case "$1" in
start)
echo "starting docker and node service"
docker-compose up -d
;;
stop)
echo "stopping"
docker-compose stop
;;
remove)
echo "removing containers"
docker-compose stop && docker-compose rm -f
;;
restart)
echo "restarting"
docker-compose stop && docker-compose rm -f
docker-compose up -d && npm start
;;
status)
echo "the status of docker containers is:"
docker-compose ps
;;
lint)
echo "running ESLint on $2"
./node_modules/.bin/eslint "$2" --fix
;;
lintall)
echo "linting files"
./node_modules/.bin/eslint server.js --fix
./node_modules/.bin/eslint "/api" --fix
./node_modules/.bin/eslint "/model" --fix
;;
node)
echo "starting npm"
node index.js --require
;;
nodemon)
echo "starting nodemon"
./node_modules/nodemon/bin/nodemon.js server.js
;;
*)
echo "Usage: ./helper [option]"
exit 1
esac
#if [ $1 == "start" ]; then
# docker-compose up -d && npm start
#else
#if [ $1 == "stop" ]; then
# docker-compose stop
#docker-compose stop && docker-compose rm -f
#echo "Feitoria!"