Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion kmp/ver-nodejs/src/jsMain/resources/srv.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,12 +171,13 @@ let srv = http.createServer((req, res) => {
// Collect request body
var body = "";
req.on("data", (chunk) => {
body = chunk.toString();
body += chunk.toString();
});

// Process request when finished collecting the body
req.on("end", () => {
let netRequest = new KT.NetRequest(body, req.method, req.url);
body = "";
srvCtrl().set("request", netRequest);
let response = srvCtrl().context.response;

Expand Down
9 changes: 9 additions & 0 deletions run-only
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash -e
SCRIPT_DIR=$(cd "$(dirname "$0")" ; pwd -P)
DIST_DIR=$SCRIPT_DIR/dist
PROJECT_DIR=$1

# Only run server
cd $DIST_DIR
npm install
npm run start -- --projectDir=../$PROJECT_DIR