
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
nuxt-subdomains
Advanced tools
A single Nuxt3 application to handle multiple subdomains
Sample • Quick Start • License • Changelog
This is a stripped down version of nuxt-multi-tenancy that requires little to no setup. Heavily inspired by zernonia/keypress open-source blogging website.
Install the module to your Nuxt application with one command:
npx nuxi module add nuxt-subdomains
# OR
pnpm dlx nuxi module add nuxt-subdomains
# OR
bunx nuxi module add nuxt-subdomains
Add nuxt-subdomains
as a dependency to your project.
npm install nuxt-subdomains
# OR
pnpm add nuxt-subdomains
# OR
bun add nuxt-subdomains
And register the module in nuxt.config.ts
:
export default defineNuxtConfig({
modules: [
// Any other modules,
"nuxt-subdomains",
],
});
You need to tell nuxt-subdomains
all your main domains of your application. Edit your nuxt.config.ts
file:
export default defineNuxtConfig({
modules: [
// Any other modules,
"nuxt-subdomains",
],
nuxtSubdomains: {
mainDomains: ["localhost:3000", "example.com"],
},
});
[!IMPORTANT]
You must enable page-based routing in your nuxt application, i.e. there must be a
pages
directory with your application files.
To create subdomains, you should add a folder preffixed with $
just under your pages directory:
.
├── nuxt.config.ts
├── package.json
├── pages
│ ├── $admin # admin subdomain directory.
│ │ ├── index.vue
│ │ └── [slug].vue
│ ├── admin # /admin route of main domain.
│ │ └── index.vue
│ ├── index.vue
│ ├── $my # my subdomain directory.
│ │ ├── index.vue
│ │ └── [slug].vue
│ └── [slug].vue
├── server
│ └── tsconfig.json
└── tsconfig.json
Reproduce the playground code to experiement with the application.
bun install
.bun run dev:prepare
.bun run dev
.FAQs
A single Nuxt3 application to handle multiple subdomains
We found that nuxt-subdomains demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers 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.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.