Files
graphene/Examples/nodejs-express-server
Paweł Marczewski 17ab04db59 [Pal,LibOS] New logging system
Instead of 'loader.debug_type', introduce 'loader.log_level'
and 'loader.log_file', along with a set of definitions for
logging at a chosen level.

For now, the call sites keep using the legacy macros (SGX_DBG and
debug()), because converting them all will conflict with other
big changes in the code base. The existing LibOS calls are
assumed to be at 'info' level.
2021-01-20 17:27:29 +01:00
..
2021-01-20 17:27:29 +01:00

Running Node.js express server with Graphene SGX

This is a Node.js application, runs an express server, listening on a given port.

Environment

This application was tested with Node.js version 8.

Prerequisites

This project requires Node.js to be installed. See https://nodejs.org/ for more details on how to install Node.js.

Run npm install, which installs all dependencies and modules needed for this application. See package.json for more details on Node.js dependencies needed for this project. At this point, the application itself can be executed without Graphene by running node helloworld.js.

Steps to run without SGX

  1. Run make.
  2. Run ./pal_loader nodejs helloworld.js 3000.
  3. The expected output should be the following: Example app listening on port 3000!

Steps to run with SGX

  1. Run make SGX=1 in order to build the application using SGX.
  2. Run ./pal_loader SGX nodejs helloworld.js 3000
  3. The expected output should be the following: Example app listening on port 3000!