This repository has been archived by the owner on Nov 22, 2019. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #83 from phantomjinx/master
TeiidTools-307
- Loading branch information
Showing
8 changed files
with
162 additions
and
34 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
var express = require("express"); | ||
var bodyParser = require("body-parser"); | ||
|
||
var app = express(); | ||
app.use(bodyParser.json()); | ||
|
||
// Create link to Angular build directory | ||
var distDir = __dirname + "/dist/"; | ||
app.use(express.static(distDir)); | ||
|
||
// Initialize the app. | ||
var server = app.listen(process.env.PORT || 8080, function () { | ||
var port = server.address().port; | ||
console.log("App now running on port", port); | ||
}); |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/bin/bash | ||
|
||
################# | ||
# | ||
# Show help and exit | ||
# | ||
################# | ||
function show_help { | ||
echo "Usage: $0 [-d] [-h]" | ||
echo "-d: run in development mode" | ||
echo "" | ||
echo "To passthrough additional arguments, enter '--' followed by the extra arguments" | ||
exit 1 | ||
} | ||
|
||
# | ||
# Determine the command line options | ||
# | ||
while getopts ":d" opt; | ||
do | ||
case $opt in | ||
d) DEV=1 ;; | ||
h) show_help ;; | ||
esac | ||
done | ||
shift "$(expr $OPTIND - 1)" | ||
|
||
if [ "${DEV}" == "1" ]; then | ||
ng serve --host 0.0.0.0 --port 8080 --disable-host-check | ||
else | ||
ng build && node ./server.js | ||
fi |