Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do we run this? #2

Open
MrYossu opened this issue Nov 23, 2023 · 16 comments
Open

How do we run this? #2

MrYossu opened this issue Nov 23, 2023 · 16 comments

Comments

@MrYossu
Copy link

MrYossu commented Nov 23, 2023

Sorry if this is a dumb question, but how do we run this code?

I tried loading the html file in a browser, but got errors in the browser console...

Access to script at 'file:///D:/multipleWindow3dScene-main/main.js' from origin 'null' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, isolated-app, chrome-extension, chrome-untrusted, https, edge.
main.js:1

Failed to load resource: net::ERR_FAILED

Please advise (in simple terms!) how we run this amazing code.

Thanks

@nigelreign
Copy link

nigelreign commented Nov 23, 2023

HOW TO RUN THE PROJECT

Install http-server:

    npm install http-server

Navigate to the project directory:

    cd multipleWindow3dScene

Start the local server:

    http-server

Open the project in your browser:

    Starting up http-server, serving ./
    Available on:
    http://127.0.0.1:8080
    http://192.168.1.10:8080

@MrYossu
Copy link
Author

MrYossu commented Nov 23, 2023

Great thanks, will give it a go

@b3n-j3ffr3y
Copy link

b3n-j3ffr3y commented Nov 23, 2023

You need to install http-server globally. With
npm install -g http-server

@hhhyw
Copy link

hhhyw commented Nov 24, 2023

哈哈哈哈 如果是用的vscode , 安装了live-serve插件, 直接 ctrl+l 再按o就好了

@yunfengsa
Copy link

python -m http.server 9000

@Molaryy
Copy link

Molaryy commented Nov 24, 2023

If you are using vscode, you can install the extension Live Server, go to your inde.html and at the bottom of your window you will find a button Go live, then go to http://localhost:5500/index.html and you will get your page :D.

@julianfere
Copy link

If you are using Visual Studio Code you can install the extension Live Server and use it with the index.html file

@Danielg212
Copy link

run npx http-server

@liushengrui527
Copy link

npm install http-server
cd multipleWindow3dScene
http-server
Starting up http-server, serving ./
Available on:
http://127.0.0.1:8080
http://192.168.1.10:8080

@liudonghua123
Copy link

I use npx serve ., but only a simple cube shown in the page, nothing errors in the console of devtools.

See also #17 (comment).

@ok-coder1
Copy link

Easier way, use the website created by the creator himself: https://bgstaal.github.io/multipleWindow3dScene/

@ok-coder1
Copy link

BTW, close this issue.

@Mujtaba-12390
Copy link

Mujtaba-12390 commented Nov 29, 2023

  1. If you are new firstly download, Node JS by searching on the browser and downloading (.msi) file

  2. After downloading successfully, Search Enviorment Variable on Start and click "Enviorment Variable" and then click New.. Afterward save your Node Js location into it. In my case ("C:\Program Files\nodejs") and click save.

  3. Then open cmd and Clone the repository

  4. ->Install http-server:

"    npm install http-server
"
  1. ->Navigate to the project directory:
"
       cd multipleWindow3dScene
"
  1. ->Start the local server:
"
       http-server
"
  1. ->Open the project in your browser:
"
  Open browser and search for 
    http://127.0.0.1:8080
    http://192.168.1.10:8080
"

@Lobohombo
Copy link

Lobohombo commented Nov 30, 2023 via email

@vxedit
Copy link

vxedit commented Dec 31, 2023

python -m http.server 9000

i also tried with python
python -m http.server
http://localhost:8000/
but its loading a cube if i open in sec window with http://localhost:8000/
it adds another rotating cube over it

@NilsBaumgartner1994
Copy link

npm install http-server
cd multipleWindow3dScene
http-server
Starting up http-server, serving ./
Available on:
http://127.0.0.1:8080
http://192.168.1.10:8080

Worked like a charm on mac

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

16 participants