Created
July 14, 2019 00:06
-
-
Save cmelgarejo/71e88313ba5e84231b53d6ea6975276e to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#!/bin/sh | |
srcPath="cmd" | |
pkgFile="main.go" | |
app="gql-server" | |
src="$srcPath/$app/$pkgFile" | |
printf "\nStart running: $app\n" | |
# Set all ENV vars for the server to run | |
export $(grep -v '^#' .env | xargs) && time go run $src | |
# This should unset all the ENV vars, just in case. | |
unset $(grep -v '^#' .env | sed -E 's/(.*)=.*/\1/' | xargs) | |
printf "\nStopped running: $app\n\n" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment