This app was meant to make a better version of my boxing club website, but also for learning purposes (use SSG, CMS, TS, tailwind...).
This is a Next.js project bootstrapped with create-next-app
.
First, install the app dependencies:
npm install
Then, run the development server:
npm run dev
# or
yarn dev
# or
pnpm dev
Open http://localhost:3000 with your browser to see the result.
The app
folder has 2 subfolders : (user) and (admin)
- (user) contains all the app pages/routes
- (admin) contains the Sanity studio page
You need a Sanity account to use this feature
Open http://localhost:3000/studio/desk with your browser to access Sanity studio (content manager).
Sanity also provides a preview mode.
-
To enable it, you need to make an API call to http://localhost:3000/api/preview
-
To see the app preview, go to http://localhost:3000
In production, replace host url with vbc-abwashere.vercel.app.
The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.
Check out our Next.js deployment documentation for more details.
First, install the vercel CLI globally, if needed:
npm install -g vercel
Then, run the build command:
vercel
If automatic deployment is enabled:
git push origin main # will automatically deploy in Preview
To deploy to prod, create a PR or rebase and push in local.