joshzcold / Cold-Family-Feud

Host your own Family Feud game. Mobile friendly with built in buzzers.
https://famf.app
MIT License
72 stars 42 forks source link

Errors when running project #44

Closed KerstinKeller closed 2 years ago

KerstinKeller commented 2 years ago

Hi, I am trying to get your project running. However, when navigating to http://localhost:3000/admin I get a 404. /new and /game work fine. In the .next/server/pages there are new.html and game.html, but no admin.html.

Has anything changed that is not recorded in the README.md?

joshzcold commented 2 years ago

Hey I'll check it out. Before I get to a computer try https://

Either one of npm run dev or npm run build && npm run start

Now that I think about it I did miss out on updating the readme.

Instead of /admin just go to the index page and click on "host" to get to the admin page.

KerstinKeller commented 2 years ago

Thanks for the the quick reply. I did npm run build && npm run start. When I go to /index and click on host, nothing happens :( Also the number of html sites in .next/server/pages is limited:

image

joshzcold commented 2 years ago

index.html, new.html, and game.html are accurate.

everything pretty much happens in / where /game and /new are side pages. Im giving this a try on my windows machine to see if I run into your problem

last time I did development I was on nodejs 14 but im giving it a try on nodejs 16

joshzcold commented 2 years ago

Also what does the console say while its running? usually it should say something like "Ready on https://localhost:3000"

joshzcold commented 2 years ago

Okay im pretty sure I know your problem. git pull the latest change on master

You'll want to do npm run build then npm run start_windows which sets the environment variable properly in windows

    "start_windows": "set NODE_ENV=production && node server.js",

nodejs (and nextjs as the library) will serve index.html when you visit the website while its running. also npm run dev will reload the application when you make changes to the source code or html.

Tell me if this works out. If you need to switch between nodejs versions take a look into nvm https://community.chocolatey.org/packages/nvm

joshzcold commented 2 years ago

Ill update the readme with better instructions some time soon. Thanks.

KerstinKeller commented 2 years ago

For some reason it seems to work now,, while it didn't work on Friday.

Thanks a bunch, for the help and the great project. It fun to use :smile: