0.0.61 • Published 4 years ago

strapi-middleware-nextjs v0.0.61

Weekly downloads
2
License
ISC
Repository
github
Last release
4 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

4 years ago

0.0.6

4 years ago

0.0.51

4 years ago

0.0.5

4 years ago

0.0.42

4 years ago

0.0.41

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.21

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago