Skip to content
Source
Sign inSign up
TanStack/router
Open History to see the last commit

e2eSetupTeardown.ts

16 lines435 Bytes

1import { localDummyServer } from './localDummyServer'
2import { getDummyServerPort } from './derivePort'
3​
4export async function e2eStartDummyServer(input: string) {
5 const port = await getDummyServerPort(input)
6​
7 return await localDummyServer(port)
8}
9​
10export async function e2eStopDummyServer(input: string) {
11 const port = await getDummyServerPort(input)
12​
13 await fetch(`http://localhost:${port}/stop`, {
14 method: 'POST',
15 })