Set up an unused method to illustrate type usage / communication between search frontend and backend

Signed-off-by: Eric Peterson <ericpeterson@spotify.com>
This commit is contained in:
Eric Peterson
2021-02-15 14:03:21 +01:00
parent 04b492d404
commit e0854f10d5
5 changed files with 24 additions and 18 deletions
+1
View File
@@ -15,3 +15,4 @@
*/
export * from './service/router';
export * from './types';
@@ -13,21 +13,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* 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 { createServiceBuilder } from '@backstage/backend-common';
import { Server } from 'http';
@@ -51,7 +36,7 @@ export async function startStandaloneServer(
const service = createServiceBuilder(module)
.enableCors({ origin: 'http://localhost:3000' })
.addRouter('/search', router);
.addRouter('/api/search', router);
return await service.start().catch(err => {
logger.error(err);