express/LINEWORKS_Pleasanter/LINEWORKS_sendMessage、いずれも過去の Express実装。Gitea移行に伴い保管。 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
33 lines
989 B
JavaScript
33 lines
989 B
JavaScript
const express = require('express');
|
|
const http = require('http');
|
|
const cors = require('cors');
|
|
const { API_KEY, PORT, SSL_OPTIONS, CORS_ORIGIN } = require('./config.js'); // config.jsから設定をインポート
|
|
|
|
// expressとCORSの設定
|
|
const app = express();
|
|
app.use(cors({
|
|
origin: CORS_ORIGIN, // config.jsから読み込み
|
|
optionsSuccessStatus: 200
|
|
}));
|
|
|
|
// lwSendMessageモジュールの読み込み
|
|
require('./modules/lwSendMessage.js')(app);
|
|
|
|
// lineworksSurveyモジュールの読み込み
|
|
require('./modules/lineworksSurvey.js')(app);
|
|
|
|
// pdfConvertモジュールの読み込み
|
|
require('./modules/pdfConvert.js')(app);
|
|
|
|
// pdfMergeモジュールの読み込み
|
|
require('./modules/pdfMerge.js')(app);
|
|
|
|
// pdfToTextモジュールの読み込み
|
|
require('./modules/pdfToText.js')(app);
|
|
|
|
// HTTPSサーバーの起動
|
|
// const PORT = PORT;
|
|
http.createServer(app).listen(PORT, '127.0.0.1', () => {
|
|
console.log(`Server running on http://127.0.0.1:${PORT}`);
|
|
});
|