mirror of
https://github.com/clearlinux/graphene.git
synced 2026-06-29 01:15:54 +00:00
e587869e13
Supporting these options complicates the design of Graphene and loading
logic significantly, providing little useful functionality:
- loader.exec:
- the main user of it were our tests
- worked only for the first process spawned inside Graphene, as it
was a unidirectional manifest->binary mapping, so the child
process didn't know about the corresponding manifest.
- sgx.sigfile:
- probably all existing usages of it were completely redundant
- was resolved relatively to CWD instead of the executable location,
which made it mostly useless
From now on, the correct location of the files is:
- either place the manifest and sigfile next to the binary, with a
matching name, or
- create a symlink to the binary in the folder where manifests are
stored and launch it through this symlink
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.
Requirements
This project requires Node.js to be installed. See https://nodejs.org/ for more details on how to install Node.js.
Steps to run with SGX
- Run
npm install, which installs all dependencies and modules needed for this application. Seepackage.jsonfor more details on Node.js dependencies needed for this project. At this point, the application itself can be executed without SGX by runningnode helloworld.js. - Run
make SGX=1in order to build the application using SGX. - Once the application is built, and manifest files are generated, execute application by running:
./pal_loader SGX nodejs.manifest.sgx helloworld.js 3000 - The expected output should be the following:
Example app listening on port 3000!
Steps to run without SGX
- Run
npm install, which installs all dependencies and modules needed for this application. Seepackage.jsonfor more details on Node.js dependencies needed for this project. - Run
node helloworld.js 3000. - The expected output should be the following:
Example app listening on port 3000!