Skip to content

Latest commit

 

History

History
81 lines (50 loc) · 3.04 KB

File metadata and controls

81 lines (50 loc) · 3.04 KB

Linen.dev

This is a Next.js project bootstrapped with create-next-app.

Quick Start

Environment Variables

Prepare your main environment settings:

cp .env.example .env

Adjust .env file to your local environment if needed.

For more information how environment variables are used look here:

Getting Started

You can run development server locally:

npm run dev

or in the Docker container. But first you have to build the container image:

docker-compose --profile app build

and then run it (run docker-compose down if you have run previously to start database):

docker-compose --profile app up -d

It will run PostgreSQL database together with web application (using profiles with Compose feature). Changes on the host, like saving a code file, immediately affect the container causing an incremental build and a hot reload in the browser.

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

To stop the containerized application run:

docker-compose down -d

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

API routes can be accessed on http://localhost:3000/api/hello. This endpoint can be edited in pages/api/hello.ts.

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 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 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.

Local domain redirect testing

  1. Ask for invite for ngrok account
  2. Setup ngrok
  3. pick subdomain i.e kam-test.ngrok.io
  4. Update dev database to have the redirect url update accounts set "redirectDomain"='kam-test.ngrok.io' where id = '9677cb41-033e-4c1a-9ae5-ef178606cad3'; - replace with your subdomain that you chose
  5. run ngrok tunnel ngrok http --region=us --hostname=kam-test.ngrok.io 3000