Nutritious Pomegranate Muffins

    @machinat/next
    TypeScript icon, indicating that this package has built-in type declarations

    0.6.0 • Public • Published

    Next Module

    This package is an underlying module of webview platform for serving a Next.js web front-end. You might want to use @machinat/webview unless you want to serve your own web service.

    Install

    npm install @machinat/core @machinat/http @machinat/next
    # or with yarn
    yarn add @machinat/core @machinat/http @machinat/next

    Docs

    Check the package reference.

    Setup

    Assume you have the Next.js project at ../webview, set up the module like this:

    import Machinat from '@machinat/core';
    import Http from '@machinat/http';
    import Next from '@machinat/next';
    import nextConfigs from '../webview/next.config.js'
    
    const DEV = process.env.NODE_ENV !== 'production';
    
    const app = Machinat.createApp({
      modules: [
        Http.initModule({ /* ... */ }),
        Next.initModule({
          entryPath: '/webview',   // have to match bastPath in next configs
          serverOptions: {
            dev: DEV,              // start with dev mode or not
            dir: '../webview',     // next.js app project dir
            conf: nextConfigs,     // imported next configs
          },
        }),
      ],
    });

    Keywords

    none

    Install

    npm i @machinat/next

    DownloadsWeekly Downloads

    6

    Version

    0.6.0

    License

    MIT

    Unpacked Size

    24 kB

    Total Files

    18

    Last publish

    Collaborators

    • lrills0515
    • lrills