-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #348 from porters-xyz/tkn-api
Tkn api
- Loading branch information
Showing
17 changed files
with
6,593 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
const express = require('express'); | ||
const cors = require('cors'); | ||
require('dotenv').config(); | ||
const app = express(); | ||
|
||
// Import the tkn routes | ||
const tknRoutes = require('./tkn/tkn'); | ||
|
||
app.use(cors()); | ||
app.use(express.json()); | ||
|
||
// Define the TKN Api routes and Swagger | ||
app.use('/tkn/v1', tknRoutes); | ||
const setupTknSwagger = require('./tkn/tkn-swagger'); // Import Swagger setup | ||
setupTknSwagger(app); | ||
|
||
// Start server | ||
const port = process.env.PORT || 3000; | ||
app.listen(port, () => { | ||
console.log(`Server running on port ${port}`); | ||
}); |
Oops, something went wrong.