Socket
Book a DemoInstallSign in
Socket

@machinat/next

Package Overview
Dependencies
Maintainers
2
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@machinat/next

This package is an underlying module of webview platform for serving a [Next.js](https://nextjs.org) web front-end. You might want to use [`@machinat/webview`](https://github.com/machinat/machinat/tree/master/packages/webview) unless you want to serve you

latest
Source
npmnpm
Version
0.6.0
Version published
Maintainers
2
Created
Source

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
      },
    }),
  ],
});

FAQs

Package last updated on 08 Jun 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts