From 4c20d727ea040f1ed6a4d4a661a57fc99b6eb661 Mon Sep 17 00:00:00 2001 From: adrianvrj Date: Fri, 20 Dec 2024 16:17:00 -0600 Subject: [PATCH 1/2] [docs] adding README file --- README.md | 114 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 114 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..b0247f0 --- /dev/null +++ b/README.md @@ -0,0 +1,114 @@ + +# Go Stark Me Frontend + +### Pre-requisites + +- Install Node.js (v20.15.1) using Node Version Manager (NVM) + + We recommend using [Node Version Manager (NVM) ](https://github.com/nvm-sh/nvm) to easily manage different versions of Node.js on your system. + +### Local configurations + + +- Rename the `frontend/gostarkme-web/.env.example` file to: `frontend/gostarkme-web/.env`. + + + +- Comment the content of the file `frontend/gostarkme-web/next.config.mjs`. Adding only one element to the ```nextConfig``` object like this: + +``` +/** @type {import('next').NextConfig} */ +const nextConfig = { + /** + * Enable static exports for the App Router. + * + * @see https://nextjs.org/docs/app/building-your-application/deploying/static-exports + */ + // output: "export", + + /** + * Set base path. This is the slug of your GitHub repository. + * + * @see https://nextjs.org/docs/app/api-reference/next-config-js/basePath + */ + // basePath: "/gostarkme", + + // assetPrefix: 'https://web3wagers.github.io/gostarkme', + + /** + * Disable server-based image optimization. Next.js does not support + * dynamic features with static exports. + * + * @see https://nextjs.org/docs/app/api-reference/components/image#unoptimized + */ + // images: { + // unoptimized: true, + // }, + + reactStrictMode: false, + }; + + export default nextConfig; +``` + + +## Local Deployment + +### Installing Dependencies + +First, install the required packages: + +```bash +cd gostarkme/frontend/gostarkme-web + +npm install +``` +### Running the Application + + +Once the dependencies are installed, start the development server: + + +```bash +npm run dev +``` + + + + +Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. + + + +## Production Deployment + + +### Installing Dependencies + +First, install the required packages: + +```bash +cd gostarkme/frontend/gostarkme-web + +npm install +``` + + +### Build the Application +To create an optimized production build, run: + + + +```bash +npm run build +``` + + +### Serve the build +Start the production server: +```bash +npm run start +``` + + +Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. From 023ba712e3c29fe10af2da5093065f0a561fa1e2 Mon Sep 17 00:00:00 2001 From: adrianvrj Date: Fri, 20 Dec 2024 16:29:06 -0600 Subject: [PATCH 2/2] [fix] correct basepath --- next.config.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/next.config.mjs b/next.config.mjs index 2b1a9b9..cd41706 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -15,7 +15,7 @@ const nextConfig = { * * @see https://nextjs.org/docs/app/api-reference/next-config-js/basePath */ - basePath: env == "prod" ? "/gostarkme" : "", + basePath: "", assetPrefix: env == "prod" ? 'https://web3wagers.github.io/gostarkme-frontend/' : "",