mirror of
https://github.com/ThatGuySam/doesitarm.git
synced 2026-05-15 06:35:20 -07:00
Add scan-new-apps script
This commit is contained in:
parent
dba6ec1486
commit
b756a53056
2 changed files with 25 additions and 0 deletions
|
|
@ -47,6 +47,7 @@
|
||||||
"lint:fix": "eslint --fix --ext .js,.vue --ignore-path .gitignore .",
|
"lint:fix": "eslint --fix --ext .js,.vue --ignore-path .gitignore .",
|
||||||
"precommit": "npm run lint",
|
"precommit": "npm run lint",
|
||||||
"clone-readme": "cp ./README.md README-temp.md",
|
"clone-readme": "cp ./README.md README-temp.md",
|
||||||
|
"scan-new-apps": "npx vite-node scripts/scan-new-apps.js",
|
||||||
"cloudflare-deploy": "npm run build-api",
|
"cloudflare-deploy": "npm run build-api",
|
||||||
"vercel-build": "run-s test-prebuild build-lists-and-api test-postbuild-api",
|
"vercel-build": "run-s test-prebuild build-lists-and-api test-postbuild-api",
|
||||||
"netlify-build": "run-s test-prebuild-functions download-sitemaps stork-index generate-astro test-postbuild-functions test-circular-deps"
|
"netlify-build": "run-s test-prebuild-functions download-sitemaps stork-index generate-astro test-postbuild-functions test-circular-deps"
|
||||||
|
|
|
||||||
24
scripts/scan-new-apps.js
Normal file
24
scripts/scan-new-apps.js
Normal 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()
|
||||||
|
})()
|
||||||
Loading…
Add table
Add a link
Reference in a new issue