mirror of
https://github.com/ThatGuySam/doesitarm.git
synced 2026-05-18 06:44:46 -07:00
Try getting port at vercel url
This commit is contained in:
parent
3e87153fc2
commit
1abbf8ddfe
1 changed files with 6 additions and 5 deletions
|
|
@ -6,12 +6,13 @@ import { isLinux } from '~/helpers/environment.js'
|
|||
|
||||
const port = 1337
|
||||
|
||||
// Example: doesitarm-cif09horl-samcarltoncreative.vercel.app
|
||||
const vercelUrl = process.env.VERCEL_URL
|
||||
|
||||
;(async () => {
|
||||
|
||||
console.log( 'process.env.VERCEL_URL:', process.env.VERCEL_URL )
|
||||
|
||||
// Disable on linux (server environments)
|
||||
if ( isLinux() ) return
|
||||
// if ( isLinux() ) return
|
||||
|
||||
// await scanNewAppsAsBrowser()
|
||||
// http://localhost:3000/
|
||||
|
|
@ -24,9 +25,9 @@ const port = 1337
|
|||
|
||||
await server.listen();
|
||||
|
||||
console.log(`Server listening on http://localhost:${ port }/`)
|
||||
console.log(`Server listening on https://${ vercelUrl }:${ port }/`)
|
||||
|
||||
const { data } = await axios.get(`http://localhost:${ port }/`)
|
||||
const { data } = await axios.get(`http://${ vercelUrl }:${ port }/`)
|
||||
|
||||
console.log( data.slice(0, 100) )
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue