Skip to content

moda-gov-tw/river-storyteller

Repository files navigation

River-storyteller

This is the repo of river-storyteller project. For more information, please refer to the following documents:

Usage

Please use following command to install dependencies:

npm install

Setup

  1. Configure environment variables. Copy contents of ./env.example into a new file ./env.local in the root directory.
  2. Setup backend server from Rivercare backend repo. The server should be running on http://localhost:8080.
  3. To abide by the Content Security Policy (CSP) setting, enable API request to local backend server by adding following rewrites() rule in the ./next.config.js file:
    ...
    async rewrites() {
        return [
        {
            source: "/api/:path*",
            destination: "http://localhost:8080/api/:path*" // Proxy to Backend
        }
        ]
    },
    ...
  4. Start the development server.
    npm run dev
  5. Open http://localhost:3000 in your brower.