mirror of
https://github.com/labring/FastGPT.git
synced 2025-10-22 20:04:01 +00:00
feat: admin add user
This commit is contained in:
@@ -16,14 +16,21 @@ useKbRoute(app);
|
||||
useSystemRoute(app);
|
||||
|
||||
app.get('/*', (req, res) => {
|
||||
res.sendFile(new URL('dist/index.html', import.meta.url).pathname);
|
||||
try {
|
||||
res.sendFile(new URL('dist/index.html', import.meta.url).pathname);
|
||||
} catch (error) {
|
||||
res.end();
|
||||
}
|
||||
});
|
||||
|
||||
app.use((err, req, res, next) => {
|
||||
res.sendFile(new URL('dist/index.html', import.meta.url).pathname);
|
||||
try {
|
||||
res.sendFile(new URL('dist/index.html', import.meta.url).pathname);
|
||||
} catch (error) {
|
||||
res.end();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
const PORT = process.env.PORT || 3001;
|
||||
app.listen(PORT, () => {
|
||||
console.log(`Server is running on port ${PORT}`);
|
||||
|
Reference in New Issue
Block a user