mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-30 18:48:55 +00:00
1 (#3924)
This commit is contained in:
18
plugins/webcrawler/SPIDER/src/index.ts
Normal file
18
plugins/webcrawler/SPIDER/src/index.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import express, { Application } from 'express';
|
||||
import bodyParser from 'body-parser';
|
||||
import searchRoutes from './routes/searchRoutes';
|
||||
import readRoutes from './routes/readRoutes';
|
||||
import quickfetchRoutes from './routes/quickfetchRoutes';
|
||||
import dotenv from 'dotenv';
|
||||
|
||||
dotenv.config();
|
||||
|
||||
const app: Application = express();
|
||||
|
||||
app.use(bodyParser.json());
|
||||
app.use('/api', searchRoutes);
|
||||
app.use('/api', readRoutes);
|
||||
app.use('/api', quickfetchRoutes);
|
||||
|
||||
const PORT = process.env.PORT || 3000;
|
||||
app.listen(PORT, () => console.log(`Server running on port ${PORT}`));
|
Reference in New Issue
Block a user