Add PM2 config

main
jasonfoknxu 2 years ago
parent 917d965f88
commit 4f49daee8d

@ -6,10 +6,11 @@ A simple RESTful API of GPT-4 / ChatGPT with Azure OpenAI Service, build with Ty
## Features
- Base on Azure OpenAI Service REST API
- Simple, easy to use, one endpoint only
- Flexible for future extension and development
- One endpoint for simple usage
- Flexible and easily extensible for future development
- Logit bias & function call are not supported yet
- RESTful API structure
- Ready for use with PM2
- Build with TypeScript, Node.js, Express
---

@ -0,0 +1,14 @@
module.exports = {
apps : [{
name : "azure-gpt-api",
script: 'dist/',
watch: true,
watch_delay: 1000,
watch : "dist",
// ignore_watch : ["node_modules"],
exec_mode: "cluster",
instances: 4,
max_memory_restart: "1G",
log_date_format: "YYYY-MM-DD HH:mm:ss Z",
}]
};

@ -1,6 +1,6 @@
{
"name": "azure-openai-chatgpt-api",
"version": "1.0.0",
"version": "1.0.1",
"description": "Simple RESTful API of GPT-4/ChatGPT with Azure OpenAI Service for testing and internal use",
"main": "dist/index.js",
"homepage": "https://github.com/jasonfoknxu/azure-openai-chatgpt-api",
@ -10,7 +10,10 @@
"scripts": {
"start": "node dist/index.js",
"build": "tsc -p tsconfig.json",
"test": "yarn start test"
"test": "yarn start test",
"pm2": "pm2 start ecosystem.config.js",
"pm2:bg": "pm2 start ecosystem.config.js --no-daemon",
"pm2:update": "pm2 startOrReload ecosystem.config.js"
},
"devDependencies": {
"@types/compression": "^1.7.2",

Loading…
Cancel
Save