
Company News
Socket Named Top Sales Organization by RepVue
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.
@builtwithjavascript/server-side-config
Advanced tools
Hook useServerSideConfig to more easily load json files with strongly typed configuration models for use in Nuxt, Next, Node, etc on the server side
Hook useServerSideConfig to more easily load json files with strongly typed configuration models for use in Nuxt, Next, Node, etc on the server side
Hook useServerSideConfig to more easily load json files with strongly typed configuration models for use in Nuxt, Next, Node, etc on the server side
TypeScript
Contains hooks:
npm i -D @builtwithjavascript/server-side-config
// create the TypeScript interface that will define the structure of your config file
// and save it under your model or other directory ('./your-path-to-your-iconfig-model'):
// for example:
interface IConfig {
name: string,
marketing: {
title: string
hero: string
},
meta: {
title: string
description: string
}
}
// create a json file named app1.json that adheres to the above interface and save it
// under a directory on your project (by default the hook will look into ./config/config-files/):
{
"name": "for-unit-tests-only",
"marketing": {
"title": "For unit-tests only",
"hero": "An example for the config file."
},
"meta": {
"title": "For unit-tests only",
"description": "An example for the config file."
}
}
// in the code where you need to consume the server-side config file (i.e. in Nuxt this would be in nuxt.config.ts), import a reference to the useServerSideConfig hook and your IConfig interface:
import { useServerSideConfig } from '@/server-side-config/'
import type { IConfig } from './your-path-to-your-iconfig-model'
// then load the server-side config file using the useServerSideConfig and passing the app key, in this case 'app1'
const instance = useServerSideConfig<IConfig>('app1')
// the default base directory for your json files is /config/config-files/
// but you could optionally specify a different path by passing this as the second arugment:
const configFilesDirectoryPath = `../my-config-files/`
const instance = useServerSideConfig<IConfig>('app1', configFilesDirectoryPath)
FAQs
Hook useServerSideConfig to more easily load json files with strongly typed configuration models for use in Nuxt, Next, Node, etc on the server side
The npm package @builtwithjavascript/server-side-config receives a total of 11 weekly downloads. As such, @builtwithjavascript/server-side-config popularity was classified as not popular.
We found that @builtwithjavascript/server-side-config demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.