nuxt-json-config

config module for nuxt
135
Install
npm install nuxt-json-config
Latest Version:0.0.2
License:MIT
Last Updated:Oct 29, 2020
Links: npm
Maintainer: djan

JSON CONFIG FOR NUXT

This module allows you to have Node config package into nuxtjs.

Installation

Use the package manager pip to install foobar.

npm i nuxt-json-config

Usage

1- Create config folder and config json file on root dir.

$ mkdir config
$ vi config/default.json

2- Edit config as you wish

{
  "server":{
    "host":"http://localhost:3000",
    "example":"/api/ex"
 }
}

3- Register module in nuxt.config.js

  modules: [
    'nuxt-json-config'
  ],

4- yarn dev and start the project

in components, you can access all config by

this.$config

example:

mounted(){
  console.log(this.$config.server.host)
}

License

MIT

Related Packages

@nuxtjs/redirect-module

Nuxt module to dynamically redirect initial requests

248,427 307
nuxt-translation-manager

Simple and easy to use translation manager for nuxt and nuxt-i18n that allows to...

16,873 19
@thunderid/nuxt

Nuxt SDK for ThunderID

6,771 7
@traum-ferienwohnungen/nuxt-advanced-healthcheck

Module for adding healthcheck urls to a nuxt project

2,621 3
@agency-undone/nuxt-module-ipfs

A Nuxt module that enables nuxt routing for both the intended path and IPFS gate...

945 8

Version History

Version Released License
0.0.2 MIT
0.0.1 MIT