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

What's the bare minimum command to run to get static content ? #21

Closed
johnchristopher opened this issue May 24, 2021 · 2 comments
Closed
Labels
documentation Improvements or additions to documentation

Comments

@johnchristopher
Copy link

Hello,

I am a bit confused. I can run npm run dev:watch and get something on http://localhost:3000 but how do I export this to static pages ?

So I could just copy those pages to apache, nginx, S3, etc. ?

npm run build seems to build something but the current folder don't have any new files or directory. npm run export complains about page "/" and says to consult next.js help.

Thanks :).

@amiroff
Copy link
Owner

amiroff commented May 24, 2021

Hey!

Thanks for the question, and it's a very valid one. I just pushed a small update in code and docs to eanble hosting on static platforms (with no node.js support) out of the box. So you should create a new project, npm install, and when your content is ready npm run export. This will create a out directory which you can just deploy on any hosting platform or just serve with any web server. I would still recommend using Vercel though, too easy not to use :)

@amiroff amiroff added the documentation Improvements or additions to documentation label May 24, 2021
@johnchristopher
Copy link
Author

johnchristopher commented May 25, 2021

Thanks :). Regarding Vercel: someday/maybe but at the moment I need some bullet proof HTML static files that can be passed around.

@amiroff amiroff closed this as completed May 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants