0.0.25 • Published 3 years ago

@w3cub/nuxt-express-module v0.0.25

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

nuxt-express-module

npm (scoped with tag) npm CircleCI Codecov Dependencies js-standard-style

📖 Release Notes

Features

Provides express and express/routes directory to write express routes within nuxt. The module will watch for all files within the express directory for changes and hot-reload without taking down the entire nuxt server.

Setup

  • Add @w3cub/nuxt-express-module dependency using yarn or npm to your project
  • Add @w3cub/nuxt-express-module to modules section of nuxt.config.js
{
  modules: [
    // Simple usage
    '@w3cub/nuxt-express-module',

    // With options
    ['@w3cub/nuxt-express-module', { /* module options */ }],
 ]
}
// express/routes/index.js sample
const {Router} = require('express')
const router = Router()

router.get('/api/test', (req, res) => {
  res.send('hello')
})

module.exports = router

Options

expressPath

Overrides the default path of where the express directory is

setupPath

Overrides the default path of where the express app file is

routesPath

Overrides the default path of where express/routes/index.js is located

Usage

Module Description

Development

  • Clone this repository
  • Install dependnecies using yarn install or npm install
  • Start development server using npm run dev

License

MIT License

Copyright (c) James Lee uptownhr@gmail.com Terry Cai gidcai@gmail.com

0.0.25

3 years ago

0.0.24

3 years ago

0.0.23

4 years ago

0.0.22

4 years ago

0.0.21

4 years ago

0.0.20

4 years ago

0.0.19

4 years ago

0.0.18

4 years ago

0.0.16

4 years ago

0.0.15

4 years ago

0.0.14

4 years ago

0.0.13

4 years ago

0.0.12

4 years ago