Added initial scaffold for techdocs backend (#1550)

* Added initial scaffold for techdocs backend

* Added test and a dummy route

* Missed file in commit

* Removed unused dependencies

* Added readme
This commit is contained in:
Sebastian Qvarfordt
2020-07-07 15:37:26 +02:00
committed by GitHub
parent 10d1e141b7
commit be7ef69328
10 changed files with 226 additions and 1 deletions
+1
View File
@@ -27,6 +27,7 @@
"@backstage/plugin-identity-backend": "^0.1.1-alpha.13",
"@backstage/plugin-scaffolder-backend": "^0.1.1-alpha.13",
"@backstage/plugin-sentry-backend": "^0.1.1-alpha.13",
"@backstage/plugin-techdocs-backend": "^0.1.1-alpha.13",
"dockerode": "^3.2.0",
"express": "^4.17.1",
"knex": "^0.21.1",
+4 -1
View File
@@ -35,6 +35,7 @@ import catalog from './plugins/catalog';
import identity from './plugins/identity';
import scaffolder from './plugins/scaffolder';
import sentry from './plugins/sentry';
import techdocs from './plugins/techdocs';
import { PluginEnvironment } from './types';
function makeCreateEnv(loadedConfigs: AppConfig[]) {
@@ -63,6 +64,7 @@ async function main() {
const scaffolderEnv = useHotMemoize(module, () => createEnv('scaffolder'));
const authEnv = useHotMemoize(module, () => createEnv('auth'));
const identityEnv = useHotMemoize(module, () => createEnv('identity'));
const techdocsEnv = useHotMemoize(module, () => createEnv('techdocs'));
const service = createServiceBuilder(module)
.loadConfig(configReader)
@@ -73,7 +75,8 @@ async function main() {
await sentry(getRootLogger().child({ type: 'plugin', plugin: 'sentry' })),
)
.addRouter('/auth', await auth(authEnv))
.addRouter('/identity', await identity(identityEnv));
.addRouter('/identity', await identity(identityEnv))
.addRouter('/techdocs', await techdocs(techdocsEnv));
await service.start().catch(err => {
console.log(err);
+22
View File
@@ -0,0 +1,22 @@
/*
* Copyright 2020 Spotify AB
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { createRouter } from '@backstage/plugin-techdocs-backend';
import { PluginEnvironment } from '../types';
export default async function createPlugin({ logger }: PluginEnvironment) {
return await createRouter({ logger });
}