abbas jafari Posted May 26, 2020 Share Posted May 26, 2020 Hi. i create a program via pixi.js. now i want give this program to my users. but when run index.html that linked my source project. give error cross origin for my files that used for Textures this program must run on localhost user's . but if cant solve this program , not running on localhost please help me... Quote Link to comment Share on other sites More sharing options...
lasertown Posted May 26, 2020 Share Posted May 26, 2020 It might be that you just need to run a webserver locally and have it serve your index.html rather than opening the index.html with a browser (if this is indeed what you're doing.) Python comes with a simple http server you can start up easily. Quote Link to comment Share on other sites More sharing options...
abbas jafari Posted May 26, 2020 Author Share Posted May 26, 2020 thanks for replying @lasertown can give me resource or simple code? I nube in programming... Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted May 26, 2020 Share Posted May 26, 2020 Once: 1. install nodejs 2. `npm install -g http-server` Every time you want to launch servre in directory: 1. run cmd in your directory 2. `http-server -c-1` . with -p8081 if you want alternative port https://github.com/http-party/http-server Quote Link to comment Share on other sites More sharing options...
grelf Posted May 26, 2020 Share Posted May 26, 2020 It looks to me as if the problem is that you have given absolute paths to the files, specifying local disc C:. You should use paths relative to your HTML file. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.