1
0
mirror of https://github.com/coder/code-server.git synced 2024-12-05 07:13:06 +08:00
code-server/test/test-plugin/src/index.ts

24 lines
566 B
TypeScript
Raw Normal View History

import * as pluginapi from "../../../typings/plugin"
import * as express from "express"
import * as path from "path";
export function init(config: pluginapi.PluginConfig) {
config.logger.debug("test-plugin loaded!")
}
export function router(): express.Router {
const r = express.Router()
r.get("/goland/icon.svg", (req, res) => {
res.sendFile(path.resolve(__dirname, "../public/icon.svg"))
})
return r
}
export function applications(): pluginapi.Application[] {
return [{
name: "goland",
version: "4.0.0",
iconPath: "icon.svg",
}]
}