shell

#!/bin/sh

# Get home directory
APP_HOME=$(cd $(dirname $0); cd ..; pwd -P)

# Project Information
ARTIFACT_ID=sample-app
VERSION=0.1
MAIN_CLASS=com.inventec.test.StartApp

# Set entry
MAIN_JAR_DIR=lib
MAIN_JAR=$ARTIFACT_ID-$VERSION.jar

# Set log directory for log4j
LOG_DIR=/export/Logs

# Set Java environment
JAVA_ENV="-Dlog-dir=$LOG_DIR"


、
var express = require('express');
var app = express();
app.get('/', function (req, res) {
res.send('Hello World!');
});
app.listen(3000, function () {
console.log('Example app listening on port 3000!');
});# Run java $JAVA_ENV -cp $APP_HOME/$MAIN_JAR_DIR/$MAIN_JAR $MAIN_CLASS
var express = require('express');
var app = express();
app.get('/', function (req, res) {
res.send('Hello World!');
});
app.listen(3000, function () {
console.log('Example app listening on port 3000!');
});

相关推荐