login and authentication
login via totp authentication via access and refresh tokens
This commit is contained in:
parent
6696975bee
commit
e1ec65350d
28 changed files with 3750 additions and 0 deletions
23
src/index.ts
Normal file
23
src/index.ts
Normal file
|
@ -0,0 +1,23 @@
|
|||
import "dotenv/config";
|
||||
import express from "express";
|
||||
|
||||
declare global {
|
||||
namespace Express {
|
||||
export interface Request {
|
||||
userId: string;
|
||||
username: string;
|
||||
rights: Array<string>;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
import { dataSource } from "./data-source";
|
||||
|
||||
dataSource.initialize();
|
||||
|
||||
const app = express();
|
||||
import router from "./routes/index";
|
||||
router(app);
|
||||
app.listen(process.env.SERVER_PORT, () => {
|
||||
console.log(`listening on *:${process.env.SERVER_PORT}`);
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue