How to run Node app locally from Github repo? - javascript

I want to run this https://github.com/supernoir/heroines-of-science locally.
I did the following steps
Cloned the app locally
Then did npm install to download all the dependencies
Opened the app folder and executed node server.js
But getting Cannot Get / when opened the webpage.
Any help would be helpful.

Related

Problem with loading .gltf files in Github pages of my React Three.js app with Vite

I deployed my React Three.js with Vite app in Github pages, and I can't get it running on a live server - https://thehero9.github.io/ThreeJsReactFiber/
This here is the code in my repo - https://github.com/TheHero9/ThreeJsReactFiber
I have no trouble with the app locally, you can try cloning it with git, then run:
npm install
npm run dev
In order to check how it works locally.
I think the .gltf files are not being loaded correctly due to a problem with the file paths or the loading code. Please, can you help us and check whether you can find why the .gltf files are not loading?
Errors:
Everything is loaded properly on a local server:
[3]: https://i.stack.imgur.com/xV31l.jpg

React app deployment issue while deploying using github repo

I was trying to deploy react app through github. After deployment, app page is not loading but in url I can see the favicon from public folder. also when I run same in local the browser open with my repo name like http://localhost:3000/groove3. what would be the reason? Please help
npm run deploy
https://anoop-acc.github.io/groove3/

Github pages responds with 404 error for three.js canvas and imports

When trying to host my webpage with a three.js background, everything loads properly when hosted locally but as soon as I push it up to github pages nothing loads - just html.
I am using vite to package my code, and gh-pages to deploy the 'dist' folder to the hosted branch. I have tried changing the urls of all images and assets to '/image' and storing the images in a public folder inside the root folder, as vite recommends. I run
$ npm run build, and
$ npm run preview
and everything looks good. I run npm run deploy (I added a deploy script in package.json, deploy: 'gh-pages -d dist'), and then host the gh-pages branch on github pages and only the html shows up, and the console shows multiple 404: file not found errors.
Repo
The hosted code is on the gh-pages branch, if that hasn't been clear already.
The url to your JS and CSS files is wrong.
Your github page is trying to load the the JS from https://talmage89.github.io/assets/index.2e5bc2a5.js...
But it should be:
https://talmage89.github.io/ThreeJSDemo2/assets/index.2e5bc2a5.js.
The Vite documentation hss specific instructions for setting the base when hosting on Github Pages

npm run build cannot access in localhost

I want to test my react/ node.js web app with a production build. I already run npm run build at the app directory and created build folder.
I was unable to run the application using localhost:8080 (server port).
Are there any ways to double check if the application is actually running in that port or access production-ready application?
PS. I used serve to host the application but it posts error 404: The requested path could not be found
Thank you for your help.
Every SPA application has its own package.json file. Inside you have to see the script section:
Normally after you run nm run build you have a compiled version of your code.
At this point, you have a see the dist folder.
After this, you can either run npm run start and you have to see
(this option is not suitable for SSR frameworks like NUXT or NEXT)
or if you don't have that option install an npm package that renders your compiled code by doing the following:
npm install -g serve
serve -s build
and you have to see

How to run AngularJS app created using yeoman

I'm new to AngularJS. I created a sample app using yeoman for AngularJS. The source is hosted on github here https://github.com/Omnipresent/demoangularapp
I'm not sure how to run the app?
How can I run the app so that it runs on my localhost server and I can play around with it?
Depending on which task runner you are using: Run CLI command gulp serve, grunt serve or npm run serve if you have the node package serve installed to start a local webserver. In your case it should be gulp serve while you using gulp this time. Run this CLI commands in your project root directoy or create a host/vhost witch points to your yo generated app directory where your index.htmlhas been created.
This commands will start an local webserver.
For mor information checkout the yo documentation.
It doesn't matter if application is generated with yeoman, it's just a scaffolding tool. You should run bash with commands: npm install, gulp serve. also make sure that you have gulp installed both globally and locally.

Categories