You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Added support for running simultaneous independent microservices.
This involved:
- configurable socket names (via launch, webserver, and host)
- unique logs
- unique killme scripts
- independent out and live directories
Copy file name to clipboardExpand all lines: doc/GettingStarted.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -92,7 +92,7 @@ make copy_app APP_NAME=toy
92
92
93
93
### Web Client Application
94
94
95
-
The web client is defined by the HTML, CSS, and JS content in `<repo>/apps/toy/client/`. In this case `<repo>/apps/toy/client/html/index.html` simply links to `<repo>/framework/client/html/testbench.html` to utilize the default test bench provided by the framework that you accessed for `vadd`. If you would like to modify the web client code, you can copy `<repo>/framework/client/*/testbench.*` into `<repo>/apps/toy/client` as a simple starting point. To develop a real application, you may have your own thoughts about the framework you would like to use. You can use what you like. Develop in a separate repo, or keep it in the same repo so it is consistently version controlled. If you would like `make launch` to start your web serer, provide `LAUNCH_W=<cmd>` in the application `Makefile`.
95
+
The web client is defined by the HTML, CSS, and JS content in `<repo>/apps/toy/client/`. In this case `<repo>/apps/toy/client/html/index.html` simply links to `<repo>/framework/client/html/testbench.html` to utilize the default test bench provided by the framework that you accessed for `vadd`. If you would like to modify the web client code, you can copy `<repo>/framework/client/*/testbench.*` into `<repo>/apps/toy/client` as a simple starting point. To develop a real application, you may have your own thoughts about the framework you would like to use. You can use what you like. Develop in a separate repo, or keep it in the same repo so it is consistently version controlled.
# Run in background to continue if the shell exits; log to webserver.log and cut off stdin to detach from the launching process's stdin (so ssh/etc can exit).
@echo "Went live!!! (Stop with 'make dead' or restart with 'make live' again.)"
872
+
-rm $(LAUNCH_DIR)/dead
873
+
touch $(LAUNCH_DIR)/live
874
+
@echo "Went live!!! (Stop with 'make$(LAUNCH_ID_ARG_STR) dead' or restart by reexecuting this command.)"
833
875
834
-
dead: ../live/$(BUILD_TARGET)/dead
835
-
../live/$(BUILD_TARGET)/dead:
836
-
if [[ -ekillme ]];thensourcekillme> /dev/null 2>&1&&echo"Giving web server time to exit gracefully."&& sleep 7;fi
837
-
@mkdir -p ../live/$(BUILD_TARGET)
838
-
rm -rf ../live/$(BUILD_TARGET)/*
839
-
@touch ../live/$(BUILD_TARGET)/dead
876
+
dead: $(LAUNCH_DIR)/dead
877
+
$(LAUNCH_DIR)/dead:
878
+
if [[ -e$(KILLME) ]];thensource$(KILLME)> /dev/null 2>&1&&echo"Giving web server time to exit gracefully."&& sleep 7;$(ALREADY_DEAD)fi
879
+
@mkdir -p $(LAUNCH_DIR) log
880
+
rm -rf $(LAUNCH_DIR)/*
881
+
@touch $(LAUNCH_DIR)/dead
840
882
841
883
842
884
843
885
PHONY: build launch
844
886
build: $(BUILD_TARGETS)
845
887
846
-
LAUNCH_CHECK=@if [ -e killme ]; then echo "Error: There appears to already be an application running. Kill it with <Ctrl-C> or 'source killme', or, if not running, 'rm killme', and try again." && false; fi
888
+
LAUNCH_CHECK=@if [ -e $(KILLME) ]; then echo "Error: There appears to already be an application running. Kill it with <Ctrl-C> or 'source $(KILLME)', or, if not running, 'rm $(KILLME)', and try again." && false; fi
Copy file name to clipboardExpand all lines: framework/webserver/server.py
+5-3
Original file line number
Diff line number
Diff line change
@@ -510,11 +510,12 @@ def EC2Args():
510
510
# by passing flags=None and params=<value of args after command-line processing>.
511
511
# Implicit params are:
512
512
# "port" (8888): Socket on which web server will listen.
513
+
# "socket" ("SOCKET"): Socket file name.
513
514
# Return: {dict} The parameters/arguments. When a command-line arg is not given, it will have default value. A flag will not exist if not given, or have "" value if given.
514
515
@staticmethod
515
516
defcommandLineArgs(flags=[], params={}):
516
517
# Apply implicit args. ("password" is from EC2Args(), but the Makefile will provide it from configuration parameters, whether used or not.)
0 commit comments