mirror of
https://github.com/arnaucube/commonroutesServer.git
synced 2026-02-27 21:16:41 +01:00
added launch-all.sh tmux script
This commit is contained in:
19
README.md
19
README.md
@@ -55,6 +55,25 @@ function postImage(req, res, filename, fileImg) {
|
||||
[...]
|
||||
```
|
||||
|
||||
### Launch using Tmux
|
||||
First move the `launch-all.sh` to the parent directory.
|
||||
Having the following directory scheme:
|
||||
```
|
||||
./
|
||||
commonRoutesBot/
|
||||
commonRoutesLandingPage/
|
||||
commonRoutesServer/
|
||||
goImgServer/
|
||||
launch-all.sh
|
||||
```
|
||||
|
||||
Make sure to have `tmux` installed, and mongodb running, and the `npm` packages of the different directories installed.
|
||||
|
||||
Then just need to run:
|
||||
```
|
||||
bash launch-all.sh
|
||||
```
|
||||
|
||||
#### RESOURCES using:
|
||||
|
||||
initial avatars users: [http://www.flaticon.com/packs/animal-icon-collection](http://www.flaticon.com/packs/animal-icon-collection)
|
||||
|
||||
19
launch-all.sh
Normal file
19
launch-all.sh
Normal file
@@ -0,0 +1,19 @@
|
||||
# assuming that mongodb is running and npm installs are performed
|
||||
|
||||
SESSION='CommonRoutes'
|
||||
|
||||
tmux new-session -d -s $SESSION
|
||||
tmux split-window -d -t 0 -v
|
||||
tmux split-window -d -t 1 -h
|
||||
tmux split-window -d -t 0 -h
|
||||
|
||||
|
||||
tmux send-keys -t 0 'cd goImgServer && ./goImgServer' enter
|
||||
tmux send-keys -t 1 'cd commonroutesServer && npm start' enter
|
||||
# tmux send-keys -t 1 'cd commonroutesServer && forever start server.js' enter
|
||||
|
||||
tmux send-keys -t 2 'cd commonroutesLandingPage && node webserver.js' enter
|
||||
# tmux send-keys -t 2 'cd commonroutesLandingPage && forever start webserver.js' enter
|
||||
tmux send-keys -t 3 'cd commonroutesBot && npm start' enter
|
||||
|
||||
tmux attach
|
||||
Reference in New Issue
Block a user