Setting up the Reveal SDK Server with Node.js and TypeScript
Step 1 - Create the Node.js Project
1 - Open a command line and create a directory named reveal-server-node
mkdir reveal-server-node
2 - Change the command line path to the newly created directory
cd reveal-server-node
3 - Initialize npm in the directory
- npm
- Yarn
- pnpm
- Bun
npm init -y
yarn init -y
pnpm init -y
bun init -y
4 - Install the express framework
- npm
- Yarn
- pnpm
- Bun
npm install express
yarn add express
pnpm add express
bun add express
5 - Install TypeScript and other package types.
- npm
- Yarn
- pnpm
- Bun
npm install typescript @types/node @types/express @types/cors --save-dev
yarn add typescript @types/node @types/express @types/cors --dev
pnpm add typescript @types/node @types/express @types/cors --save-dev
bun add typescript @types/node @types/express @types/cors --dev
6 - Install Nodemon and ts-node packages.
- npm
- Yarn
- pnpm
- Bun
npm install nodemon ts-node --save-dev
yarn add nodemon ts-node --dev
pnpm add nodemon ts-node --save-dev
bun add nodemon ts-node --dev
7 - Configure TypeScript. In this example, we are setting the root directory to "src" and the output directory to "dist".
npx tsc --init --rootDir src --outDir dist
8 - Open the project in VS Code
code .
9 - Create a new file named app.ts in a directory called src

Add the following code:
app.ts
import express, { Application } from 'express';
const app: Application = express();
app.listen(5111, () => {
console.log(`Reveal server accepting http requests`);
});