Add scan-new-apps script

This commit is contained in:
Sam Carlton 2022-08-21 08:59:36 -05:00
parent dba6ec1486
commit b756a53056
2 changed files with 25 additions and 0 deletions

24
scripts/scan-new-apps.js Normal file
View file

@ -0,0 +1,24 @@
import { createServer } from 'vite'
import axios from 'axios'
import viteConfig from '~/vite.config.mjs'
;(async () => {
// await scanNewAppsAsBrowser()
// http://localhost:3000/
const server = await createServer({
...viteConfig,
})
await server.listen();
console.log('Server listening on http://localhost:3000/')
const { data } = await axios.get('http://localhost:3000/')
console.log( data.slice(0, 100) )
await server.close();
process.exit()
})()