0.0.61 • Published 5 years ago

strapi-middleware-nextjs v0.0.61

Weekly downloads
2
License
ISC
Repository
github
Last release
5 years ago

Strapi NextJS Middleware

How it works

Creates additional routing details for the root url of your project.

Installing

Using npm

npm install --save strapi-middleware-nextjs next react react-dom

Using yarn

yarn add strapi-middleware-nextjs next react react-dom

Setup

For Strapi stable versions, add a middleware.js file within your config folder

e.g

touch config/middleware.js
module.exports = {
  settings: {
    public: {
        defaultIndex: false
    }
  },
};

and in your root directory create a pages folder

touch pages/index.js

Paste inside index.js

function HomePage() {
  return <div>Welcome to Next.js!</div>
}

export default HomePage
strapi build
strapi run

Strapi Middleware NextJS Config

"enabled": boolean, // Enable or disable the middle ware based on config
"overripeApiRoutes": boolean, // Enable or disable the api route adjustment [default:"/api/{route}"), false:"/{route}" ]
"enableProd": boolean, // Enable NextJS middleware in production environment 
0.0.61

5 years ago

0.0.6

5 years ago

0.0.51

5 years ago

0.0.5

5 years ago

0.0.42

5 years ago

0.0.41

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.21

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago