mirror of
https://github.com/linsa-io/linsa.git
synced 2026-01-12 12:20:23 +01:00
Encore deploy (#143)
* new deploy * remove jazz from api for now * . * secrets * . * .
This commit is contained in:
@@ -1,10 +1,20 @@
|
|||||||
import { api, APIError } from "encore.dev/api"
|
import { api, APIError } from "encore.dev/api"
|
||||||
import { startWorker } from "jazz-nodejs"
|
// import { startWorker } from "jazz-nodejs"
|
||||||
import { ID } from "jazz-tools"
|
// import { ID } from "jazz-tools"
|
||||||
|
import { secret } from "encore.dev/config"
|
||||||
|
import log from "encore.dev/log"
|
||||||
|
|
||||||
const JAZZ_WORKER_ACCOUNT_ID = process.env.JAZZ_WORKER_ACCOUNT_ID
|
const jazzWorkerAccountId = secret("jazzWorkerAccountId")
|
||||||
const JAZZ_WORKER_SECRET = process.env.JAZZ_WORKER_SECRET
|
const jazzWorkerSecret = secret("jazzWorkerSecret")
|
||||||
const JAZZ_PUBLIC_GLOBAL_GROUP = process.env.JAZZ_PUBLIC_GLOBAL_GROUP
|
const jazzPublicGlobalGroup = secret("jazzPublicGlobalGroup")
|
||||||
|
|
||||||
|
export const testRoute = api(
|
||||||
|
{ expose: true, method: "GET", path: "/test" },
|
||||||
|
async ({}: {}): Promise<void> => {
|
||||||
|
console.log(jazzPublicGlobalGroup(), "group")
|
||||||
|
log.info("better logs from encore")
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
// return all content for GlobalTopic
|
// return all content for GlobalTopic
|
||||||
export const getTopic = api(
|
export const getTopic = api(
|
||||||
@@ -20,10 +30,10 @@ export const getTopic = api(
|
|||||||
url: string
|
url: string
|
||||||
}[]
|
}[]
|
||||||
}> => {
|
}> => {
|
||||||
const { worker } = await startWorker({
|
// const { worker } = await startWorker({
|
||||||
accountID: "co_zhvp7ryXJzDvQagX61F6RCZFJB9",
|
// accountID: "co_zhvp7ryXJzDvQagX61F6RCZFJB9",
|
||||||
accountSecret: JAZZ_WORKER_SECRET
|
// accountSecret: JAZZ_WORKER_SECRET
|
||||||
})
|
// })
|
||||||
|
|
||||||
// TODO: how to get the import from outside this package?
|
// TODO: how to get the import from outside this package?
|
||||||
// const globalGroupId = process.env.JAZZ_PUBLIC_GLOBAL_GROUP as ID<any>
|
// const globalGroupId = process.env.JAZZ_PUBLIC_GLOBAL_GROUP as ID<any>
|
||||||
|
|||||||
@@ -2,9 +2,10 @@
|
|||||||
// it is responsible for adding and getting links into LA from API
|
// it is responsible for adding and getting links into LA from API
|
||||||
|
|
||||||
import { api, APIError } from "encore.dev/api"
|
import { api, APIError } from "encore.dev/api"
|
||||||
import { startWorker } from "jazz-nodejs"
|
// import { startWorker } from "jazz-nodejs"
|
||||||
|
import { secret } from "encore.dev/config"
|
||||||
|
|
||||||
const JAZZ_WORKER_SECRET = process.env.JAZZ_WORKER_SECRET
|
const jazzWorkerSecret = secret("jazzWorkerSecret")
|
||||||
|
|
||||||
export const addPersonalLink = api(
|
export const addPersonalLink = api(
|
||||||
{ expose: true, method: "POST", path: "/save-link" },
|
{ expose: true, method: "POST", path: "/save-link" },
|
||||||
|
|||||||
@@ -4,7 +4,6 @@
|
|||||||
"version": "0.0.1",
|
"version": "0.0.1",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "vitest",
|
|
||||||
"dev": "encore run"
|
"dev": "encore run"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
@@ -13,8 +12,7 @@
|
|||||||
"vitest": "^1.5.0"
|
"vitest": "^1.5.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"encore.dev": "^1.35.3",
|
"encore.dev": "^1.35.3"
|
||||||
"jazz-nodejs": "^0.7.34"
|
|
||||||
},
|
},
|
||||||
"optionalDependencies": {
|
"optionalDependencies": {
|
||||||
"@rollup/rollup-linux-x64-gnu": "^4.13.0"
|
"@rollup/rollup-linux-x64-gnu": "^4.13.0"
|
||||||
|
|||||||
66
package.json
66
package.json
@@ -1,35 +1,35 @@
|
|||||||
{
|
{
|
||||||
"name": "learn-anything",
|
"name": "learn-anything",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "bun web",
|
"dev": "bun web",
|
||||||
"web": "cd web && bun dev",
|
"web": "cd web && bun dev",
|
||||||
"web:build": "bun run --filter '*' build",
|
"web:build": "bun run --filter '*' build",
|
||||||
"cli": "bun run --watch cli/run.ts",
|
"cli": "bun run --watch cli/run.ts",
|
||||||
"seed": "bun --watch cli/seed.ts",
|
"seed": "bun --watch cli/seed.ts",
|
||||||
"tauri": "tauri",
|
"tauri": "tauri",
|
||||||
"app:build": "bun tauri build -b dmg -v"
|
"app:build": "bun tauri build -b dmg -v"
|
||||||
},
|
},
|
||||||
"workspaces": [
|
"workspaces": [
|
||||||
"web"
|
"web"
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@tauri-apps/cli": "^2.0.0-rc.11",
|
"@tauri-apps/cli": "^2.0.0-rc.11",
|
||||||
"@tauri-apps/plugin-fs": "^2.0.0-rc.2",
|
"@tauri-apps/plugin-fs": "^2.0.0-rc.2",
|
||||||
"jazz-nodejs": "0.7.35-unique.2",
|
"jazz-nodejs": "0.7.35-unique.2",
|
||||||
"react-icons": "^5.3.0"
|
"react-icons": "^5.3.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"bun-types": "^1.1.26"
|
"bun-types": "^1.1.26"
|
||||||
},
|
},
|
||||||
"prettier": {
|
"prettier": {
|
||||||
"plugins": [
|
"plugins": [
|
||||||
"prettier-plugin-tailwindcss"
|
"prettier-plugin-tailwindcss"
|
||||||
],
|
],
|
||||||
"useTabs": true,
|
"useTabs": true,
|
||||||
"semi": false,
|
"semi": false,
|
||||||
"trailingComma": "none",
|
"trailingComma": "none",
|
||||||
"printWidth": 120,
|
"printWidth": 120,
|
||||||
"arrowParens": "avoid"
|
"arrowParens": "avoid"
|
||||||
},
|
},
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user