Skip to content

Quickly get bugout frontend app running by installing it from a template

License

Notifications You must be signed in to change notification settings

bugout-dev/frontend_template

Repository files navigation

This is a bugout-dev frontend app template ment to be bootstrapped with create-next-app.

Creating new app

  1. npx create-next-app app-name -e https://github.com/bugout-dev/frontend_template
  2. cd app-name
  3. cp sample.env my.env and setup variables
  4. source my.env
  5. Modify src/core/constants.js to configure app constants

Getting Started

First, run the development server:

npm run dev
# or
yarn dev

Open http://localhost:3000 with your browser to see the result.

You can start editing the page by modifying pages/index.js. The page auto-updates as you edit the file.

For each page url page you need to create a file in /pages directory. See examples in /pages_templates

NEXT js app can be used with SSR - API routes can be accessed on http://localhost:3000/api/hello. This endpoint can be edited in pages/api/hello.tsx.

The pages/api directory is mapped to /api/*. Files in this directory are treated as API routes instead of React pages.

Learn More

To learn more about Bugout and Moonstream, take a look at the following resources:

To learn more about Next.js, take a look at the following resources:

You can check out the Next.js GitHub repository - your feedback and contributions are welcome!

Deploy on Static bucket AWS

First lint your files. Happy linter - happy life!

yarn lint

Next

yarn build

Your project will be generated in /build directory

Since you might have dynamic routes that have no physical index.html that will correspond to your route, your routes will eventually be handled by s3 error redirect. In order to display dynamic routes correctly, set S3 404 redirect to /base_url/entry-point/index.html This route will ensure correct load and entrying in the next js app

Deploy on Vercel

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.

About

Quickly get bugout frontend app running by installing it from a template

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published