phetsims / example-sim

Example demonstrating the structure of a PhET interactive simulation.
GNU General Public License v3.0
14 stars 27 forks source link

How to Run Http server with custom domain #20

Open srikanthofficebasics opened 1 month ago

srikanthofficebasics commented 1 month ago

How to Run Http server with custom domain, all simulation run on custom domain

brettfiedler commented 1 month ago

Hi @srikanthofficebasics,

Could you provide a little more detail about what you are trying to do? What have you tried so far?

I assume you are referring to the server that is run locally for development purposes (using the http-server node package, though you could use other methods to locally host). Or are you referring to deploying your project?

srikanthofficebasics commented 1 month ago

hi @brettfiedler

i have followed the steps as below url on windows server 2019. https://github.com/phetsims/phet-info/blob/main/doc/phet-development-overview.md

run below query

http-server -S -C C:\Certs\sim\cloud\sims.crt -K C:\Certs\sim\cloud\sims.key -c-1 -a sims.test.in -p 3451 but not able to access https://sims.test.in:3451/area-model-algebra/area-model-algebra_en.html i have taken certificates from cloudflare

inside vm i am able access it. but out side of vm not bale access it. i have added A name with ip address in cloudflare

if i run below command i am getting error http-server -S -C C:\Certs\sim\cloud\sims.crt -K C:\Certs\sim\cloud\sims.key -c-1 -a sims.test.in -p 443 node:events:497 throw er; // Unhandled 'error' event ^

Error: listen EACCES: permission denied 127.0.0.1:443 at Server.setupListenHandle [as _listen2] (node:net:1882:21) at listenInCluster (node:net:1961:12) at GetAddrInfoReqWrap.doListen [as callback] (node:net:2135:7) at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:111:8) Emitted 'error' event on Server instance at: at emitErrorNT (node:net:1940:8) at process.processTicksAndRejections (node:internal/process/task_queues:82:21) { code: 'EACCES', errno: -4092, syscall: 'listen', address: '127.0.0.1', port: 443 }

Node.js v20.17.0

when i run below command working fine with IP address. but i am get certificate error. http-server -S -C C:\Certs\sim\cloud\sims.crt -K C:\Certs\sim\cloud\sims.key -c-1 -p 3451

image with ip address , how to resolve the certificate error

other wise let me know the steps for IIS Deployment of sims

srikanthofficebasics commented 1 month ago

Any update on this

srikanthofficebasics commented 1 month ago

@samreid @zepumph @SaurabhTotey @liammulh Can you please help on this issue.

brettfiedler commented 1 month ago

Hi @srikanthofficebasics,

I pinged some devs on this to get feedback. It sounds like the issue itself is outside the scope of SceneryStack (the PhET development libraries) and may be an issue with the server you're using. You might need to seek help in channels dedicated specifically to the server (Cloudflare?).

That being said, they came up with a few things to try:

Hope that helps!

srikanthofficebasics commented 1 month ago

@brettfiedler ,

I have below issues here.

  1. Sim Loading take almost 25 sec, how to
  2. Android Chrome Simulations are not working, do i need to have any steps to work on android Chrome.
  3. in server with out accessing SIM, below commands are running continuously. Safari/537.36" [Mon Sep 30 2024 21:15:19 GMT-0700 (Pacific Daylight Time)] "GET /chipper/dist/js/scenery-phet/js/buttons/ResetButton.js" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36" [Mon Sep 30 2024 21:15:19 GMT-0700 (Pacific Daylight Time)] "GET /chipper/dist/js/tambo/js/sharedSoundPlayers.js" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36" [Mon Sep 30 2024 21:15:19 GMT-0700 (Pacific Daylight Time)] "GET /chipper/dist/js/projectile-data-lab/js/common-vsm/view/VSMFieldSignNode.js" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36" [Mon Sep 30 2024 21:15:19 GMT-0700 (Pacific Daylight Time)] "GET /chipper/dist/js/sun/js/accessibility/AccessibleValueHandlerHotkeyDataCollection.js" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36" [Mon Sep 30 2024 21:15:19 GMT-0700 (Pacific Daylight Time)] "GET /chipper/dist/js/sun/js/GroupItemOptions.js" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36" [Mon Sep 30 2024 21:15:19 GMT-0700 (Pacific Daylight Time)] "GET /chipper/dist/js/projectile-data-lab/images/launcherPattern6_svg.js" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36" [Mon Sep 30 2024 21:15:19 GMT-0700 (Pacific Daylight Time)] "GET /chipper/dist/js/phet-core/js/getGlobal.js" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36" [Mon Sep 30 2024 21:15:19 GMT-0700 (Pacific Daylight Time)] "GET /chipper/dist/js/scenery-phet/images/measuringTape_png.js" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36" [Mon Sep 30 2024 21:15:19 GMT-0700 (Pacific Daylight Time)] "GET /chipper/dist/js/projectile-data-lab/sounds/autoGenerateButton_mp3.js" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36" [Mon Sep 30 2024 21:15:19 GMT-0700 (Pacific Daylight Time)] "GET /chipper/dist/js/projectile-data-lab/js/common-vsm/view/PDLStopwatchNode.js" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36" [Mon Sep 30 2024 21:15:19 GMT-0700 (Pacific Daylight Time)] "GET /chipper/dist/js/scenery-phet/js/SoundRichDragListener.js" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36" [Mon Sep 30 2024 21:15:19 GMT-0700 (Pacific Daylight Time)] "GET /chipper/dist/js/bamboo/js/ChartTransform.js" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36" [Mon Sep 30 2024 21:15:19 GMT-0700 (Pacific Daylight Time)] "GET /chipper/dist/js/dot/js/QRDecomposition.js" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36" [Mon Sep 30 2024 21:15:19 GMT-0700 (Pacific Daylight Time)] "GET /chipper/dist/js/tandem/js/isClearingPhetioDynamicElementsProperty.js" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36" [Mon Sep 30 2024 21:15:19 GMT-0700 (Pacific Daylight Time)] "GET /chipper/dist/js/joist/js/UpdateNodes.js" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36" [Mon Sep 30 2024 21:15:19 GMT-0700 (Pacific Daylight Time)] "GET /chipper/dist/js/scenery-phet/js/StopIconShape.js" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36" [Mon Sep 30 2024 21:15:19 GMT-0700 (Pacific Daylight Time)] "GET /chipper/dist/js/kite/js/segments/EllipticalArc.js" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36" [Mon Sep 30 2024 21:15:19 GMT-0700 (Pacific Daylight Time)] "GET /chipper/dist/js/sun/js/buttons/ButtonModel.js" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36"
srikanthofficebasics commented 1 month ago

@brettfiedler

Any update on the above one. also i am getting below error

[Thu Oct 10 2024 00:25:36 GMT-0700 (Pacific Daylight Time)] "GET /number-line-distance/node_modules/ini/" "Mozilla/5.0 (Linux; Android 6.0.1; Nexus 5X Build/MMB29P) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.6668.89 Mobile Safari/537.36 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)" (node:43156) [DEP0066] DeprecationWarning: OutgoingMessage.prototype._headers is deprecated (Use node --trace-deprecation ... to show where the warning was created) [Thu Oct 10 2024 00:25:37 GMT-0700 (Pacific Daylight Time)] "GET /proportion-playground/node_modules/balanced-match/package.json" "Mozilla/5.0 (Linux; Android 6.0.1; Nexus 5X Build/MMB29P) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.6668.89 Mobile Safari/537.36 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)" [Thu Oct 10 2024 00:25:38 GMT-0700 (Pacific Daylight Time)] "GET /babel/equality-explorer-basics/equality-explorer-basics-strings_ht.json" "Mozilla/5.0 (compatible; DataForSeoBot/1.0; +https://dataforseo.com/dataforseo-bot)" [Thu Oct 10 2024 00:25:43 GMT-0700 (Pacific Daylight Time)] "GET /babel/equality-explorer-basics/equality-explorer-basics-strings_ca.json" "Mozilla/5.0 (compatible; DataForSeoBot/1.0; +https://dataforseo.com/dataforseo-bot)" [Thu Oct 10 2024 00:25:47 GMT-0700 (Pacific Daylight Time)] "GET /babel/equality-explorer-basics/equality-explorer-basics-strings_vi.json" "Mozilla/5.0 (compatible; DataForSeoBot/1.0; +https://dataforseo.com/dataforseo-bot)"

@samreid @zepumph @SaurabhTotey @liammulh Can you please help on this issue.

kathy-phet commented 1 month ago

@srikanthofficebasics - The PhET simulations project has a Partnerships Program, for organizations interested in using PhET simulations within their products. From this thread, it sounds like this may describe your situation. If your company is looking to use the PhET simulations in a product, please contact us at phet-partnerships@colorado.edu, and we are happy to connect to describe our Partnership Programs and how we work with companies to make it easy to integrate PhET simulations and keep the simulations up-to-date within the product. We describe our Partnership Program here: https://phet.colorado.edu/en/partnerships You can request a meeting on that page, or email us at phet-partnerships@colorado.edu.