Migrated to using Bun instead of Node and PNPM. This also brings in a Devcontainer which enables quick and easy development of the project. Additionally this adds connectivity to S3 (with a default Minio server pre-created) this enables Files to be uploaded against Mantises. There's also a new Internal Notes feature to store arbitrary text notes against a Mantis.
This commit is contained in:
parent
80ca48be70
commit
3b846b8c8e
23 changed files with 3210 additions and 6490 deletions
|
@ -36,10 +36,16 @@ dotenv.config();
|
|||
|
||||
const httpLogger = pinoHttp({ logger });
|
||||
|
||||
// Define host and port with defaults
|
||||
const HOST = process.env.HOST || '0.0.0.0'; // Listen on all interfaces by default
|
||||
const PORT = parseInt(process.env.BACKEND_PORT || '9101', 10);
|
||||
const FRONTEND_PORT = parseInt(process.env.FRONTEND_PORT || '9100', 10);
|
||||
|
||||
// Define Relying Party details (Update with your actual details)
|
||||
export const rpID = process.env.NODE_ENV === 'production' ? 'stylepoint.uk' : 'localhost';
|
||||
export const rpName = 'StylePoint';
|
||||
export const origin = process.env.NODE_ENV === 'production' ? `https://${rpID}` : `http://${rpID}:9000`;
|
||||
// Use the configured PORT for the origin URL
|
||||
export const origin = process.env.NODE_ENV === 'production' ? `https://${rpID}` : `http://${rpID}:${FRONTEND_PORT}`;
|
||||
|
||||
export const challengeStore = new Map();
|
||||
|
||||
|
@ -130,9 +136,10 @@ if (process.env.PROD)
|
|||
|
||||
app.use(express.static('public', { index: false }));
|
||||
|
||||
app.listen(8000, () =>
|
||||
app.listen(PORT, HOST, () =>
|
||||
{
|
||||
logger.info('Server is running on http://localhost:8000');
|
||||
// Use the configured HOST and PORT in the log message
|
||||
logger.info(`Server is running on http://${HOST}:${PORT}`);
|
||||
|
||||
setupMantisDownloader();
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue