resolve comments
This commit is contained in:
parent
f6f5db01f8
commit
12e765109e
@ -1,17 +1,19 @@
|
|||||||
import fastify from 'fastify'
|
import fastify from 'fastify'
|
||||||
|
import dotenv from 'dotenv'
|
||||||
import v1API from './v1'
|
import v1API from './v1'
|
||||||
const JAN_API_PORT = 1337;
|
|
||||||
const server = fastify()
|
const server = fastify()
|
||||||
|
|
||||||
const USER_ROOT_DIR = '.data'
|
dotenv.config()
|
||||||
server.register(v1API, {prefix: "/api/v1"})
|
server.register(v1API, {prefix: "/api/v1"})
|
||||||
|
|
||||||
|
|
||||||
|
const JAN_API_PORT = Number.parseInt(process.env.JAN_API_PORT || '1337')
|
||||||
|
const JAN_API_HOST = process.env.JAN_API_HOST || "0.0.0.0"
|
||||||
|
|
||||||
server.listen({
|
server.listen({
|
||||||
port: JAN_API_PORT,
|
port: JAN_API_PORT,
|
||||||
host: "0.0.0.0"
|
host: JAN_API_HOST
|
||||||
}).then(()=>{
|
}).then(() => {
|
||||||
console.log(`JAN API listening at: http://0.0.0.0:${JAN_API_PORT}`);
|
console.log(`JAN API listening at: http://0.0.0.0:${JAN_API_PORT}`);
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@ -4,76 +4,23 @@
|
|||||||
"main": "./build/main.js",
|
"main": "./build/main.js",
|
||||||
"author": "Jan <service@jan.ai>",
|
"author": "Jan <service@jan.ai>",
|
||||||
"license": "AGPL-3.0",
|
"license": "AGPL-3.0",
|
||||||
"homepage": "https://github.com/janhq/jan/tree/main/electron",
|
"homepage": "https://jan.ai",
|
||||||
"description": "Use offline LLMs with your own data. Run open source models like Llama2 or Falcon on your internal computers/servers.",
|
"description": "Use offline LLMs with your own data. Run open source models like Llama2 or Falcon on your internal computers/servers.",
|
||||||
"build": {
|
"build": "",
|
||||||
"appId": "jan.ai.app",
|
|
||||||
"productName": "Jan",
|
|
||||||
"files": [
|
|
||||||
"renderer/**/*",
|
|
||||||
"build/*.{js,map}",
|
|
||||||
"build/**/*.{js,map}",
|
|
||||||
"core/pre-install",
|
|
||||||
"core/plugin-manager/facade"
|
|
||||||
],
|
|
||||||
"asarUnpack": [
|
|
||||||
"core/pre-install"
|
|
||||||
],
|
|
||||||
"publish": [
|
|
||||||
{
|
|
||||||
"provider": "github",
|
|
||||||
"owner": "janhq",
|
|
||||||
"repo": "jan"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"extends": null,
|
|
||||||
"mac": {
|
|
||||||
"type": "distribution",
|
|
||||||
"entitlements": "./entitlements.mac.plist",
|
|
||||||
"entitlementsInherit": "./entitlements.mac.plist",
|
|
||||||
"notarize": {
|
|
||||||
"teamId": "YT49P7GXG4"
|
|
||||||
},
|
|
||||||
"icon": "icons/icon.png"
|
|
||||||
},
|
|
||||||
"linux": {
|
|
||||||
"target": [
|
|
||||||
"deb"
|
|
||||||
],
|
|
||||||
"category": "Utility",
|
|
||||||
"icon": "icons/"
|
|
||||||
},
|
|
||||||
"win": {
|
|
||||||
"icon": "icons/icon.png"
|
|
||||||
},
|
|
||||||
"artifactName": "jan-${os}-${arch}-${version}.${ext}"
|
|
||||||
},
|
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"lint": "eslint . --ext \".js,.jsx,.ts,.tsx\"",
|
"lint": "eslint . --ext \".js,.jsx,.ts,.tsx\"",
|
||||||
"test:e2e": "playwright test --workers=1",
|
"test:e2e": "playwright test --workers=1",
|
||||||
"dev": "nodemon .",
|
"dev": "nodemon .",
|
||||||
"build": "tsc",
|
"build": "tsc"
|
||||||
"build:test": "",
|
|
||||||
"build:publish": ""
|
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@npmcli/arborist": "^7.1.0",
|
|
||||||
"@types/request": "^2.48.12",
|
|
||||||
"@uiball/loaders": "^1.3.0",
|
|
||||||
"express": "^4.18.2",
|
|
||||||
"pacote": "^17.0.4",
|
|
||||||
"request": "^2.88.2",
|
|
||||||
"request-progress": "^3.0.0",
|
|
||||||
"use-debounce": "^9.0.4"
|
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@playwright/test": "^1.38.1",
|
|
||||||
"@types/body-parser": "^1.19.5",
|
"@types/body-parser": "^1.19.5",
|
||||||
"@types/express": "^4.17.21",
|
|
||||||
"@types/npmcli__arborist": "^5.6.4",
|
"@types/npmcli__arborist": "^5.6.4",
|
||||||
"@types/pacote": "^11.1.7",
|
|
||||||
"@typescript-eslint/eslint-plugin": "^6.7.3",
|
"@typescript-eslint/eslint-plugin": "^6.7.3",
|
||||||
"@typescript-eslint/parser": "^6.7.3",
|
"@typescript-eslint/parser": "^6.7.3",
|
||||||
|
"dotenv": "^16.3.1",
|
||||||
"eslint-plugin-react": "^7.33.2",
|
"eslint-plugin-react": "^7.33.2",
|
||||||
"fastify": "^4.24.3",
|
"fastify": "^4.24.3",
|
||||||
"nodemon": "^3.0.1",
|
"nodemon": "^3.0.1",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user