Skip to content
This repository was archived by the owner on Jan 9, 2026. It is now read-only.

Commit d407e0b

Browse files
authored
Merge pull request #15 from workos/feature/sup-948-typescript-example-apps-audit-all
SSO, Magic Link, Admin Portal, MFA Example App Audit
2 parents 374adf3 + aeec8d2 commit d407e0b

35 files changed

Lines changed: 2635 additions & 7917 deletions

File tree

typescript-admin-portal-example/README.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,20 @@ WORKOS_CLIENT_ID=your_client_id_here
4343

4444
4. Set your [Default Redirect Link](https://dashboard.workos.com/configuration).
4545

46-
## Run the server and log in using SSO
46+
## Run the development server
4747

4848
```sh
49-
ts-node index.ts
49+
npm run dev
5050
```
5151

52-
Head to `http://localhost:3000/` to begin!
52+
## Compile TypeScript code and run the server
53+
54+
```sh
55+
npm run build
56+
npm start
57+
```
58+
59+
Head to `http://localhost:8000/` to begin the SSO or Directory Sync configuration flow!
5360

5461

5562
## Need help?

typescript-admin-portal-example/index.js

Lines changed: 0 additions & 20 deletions
This file was deleted.
Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,20 @@
1-
import express from "express";
2-
import router from "./routes/index";
3-
import bodyParser from "body-parser";
4-
import dotenv from 'dotenv';
5-
dotenv.config();
1+
import express, { Application } from "express"
2+
import 'dotenv/config'
3+
import router from "./routes/index"
4+
import morgan from 'morgan'
65

7-
const app = express();
8-
const port = 3000;
6+
const app: Application = express()
97

10-
app.use(bodyParser.urlencoded({ extended: true }))
11-
app.use("/", router);
12-
app.use('/public', express.static('public'));
8+
const port: string = process.env.PORT || '8000'
139

14-
// start the Express server
15-
app.listen(port, () => {
16-
// tslint:disable-next-line:no-console
17-
console.log(`server started at ${port}`);
18-
});
10+
app.use('/public', express.static('public'))
11+
12+
app.use(express.urlencoded({ extended: false }))
13+
14+
app.use(morgan('dev'))
15+
16+
app.use('/', router)
17+
18+
app.listen(port, (): void => {
19+
console.log(`⚡️[server]: Server is running at https://localhost:${port}`)
20+
})

0 commit comments

Comments
 (0)