Next.js Discord

Discord Forum

Hosting

Answered
American black bear posted this in #help-forum
Open in Discord
Avatar
American black bearOP
Hello. What is the good hosting for hosting a website ?
Answered by chisto
which hosting is that?
if you only want htm/CSS/JS static assets, you wont have all the features that require a server, that said, in your next.config.js you add output: 'export' and run next build, that will produce an out folder with HTML/CSS/JS assets

const nextConfig = {
output: 'export',
}

module.exports = nextConfig
View full answer

12 Replies

Avatar
vercel
Avatar
American black bearOP
I have another hosting now. How can i import static file that i can uplaod to the provider ( he need html files css and javascript )
Avatar
do you have access to the codebase?
Avatar
American black bearOP
Its my website i coded it i have all files to thw website
but i need to know how can i import next.js files to html css javascript
Avatar
you can use npm run build to generate the necessary files and send it to any hosting
Avatar
American black bearOP
yes and what files it generated me .next folder but the .next folder have many many files. What files should i upload the whole .next folder or?
Avatar
on https://app.netlify.com/drop you can just send the static folder inside .next

on vercel you can connect your github and choose the proyect, name it and deploy, it automatically does the building
Avatar
American black bearOP
Yes im usining other hosting that needs html and i bouguted it. Where can i get the static web?
Avatar
which hosting is that?
if you only want htm/CSS/JS static assets, you wont have all the features that require a server, that said, in your next.config.js you add output: 'export' and run next build, that will produce an out folder with HTML/CSS/JS assets

const nextConfig = {
output: 'export',
}

module.exports = nextConfig
Answer
Avatar
American black bearOP
i will try it
tomorrow