CanxJS Extension for VS Code
🚀 Official VS Code extension for CanxJS - Ultra-fast async-first MVC backend framework for Bun.
Features
📝 Snippets (20+)
Type these prefixes in TypeScript/JavaScript files:
| Prefix |
Description |
canx-controller |
Basic controller |
canx-controller-crud |
Full CRUD controller |
canx-controller-api |
API controller with JWT |
canx-controller-auth |
Auth controller |
canx-routes |
Routes file boilerplate |
canx-route |
Single route |
canx-route-group |
Route group |
canx-route-controller |
Controller routing |
canx-model |
Model with methods |
canx-migration |
Database migration |
canx-seeder |
Database seeder |
canx-middleware |
Custom middleware |
canx-auth-middleware |
JWT auth middleware |
canx-layout |
Layout template |
canx-view |
JSX view component |
canx-jsx-component |
Reusable component |
canx-app |
App entry point |
canx-config |
Configuration file |
canx-queue-job |
Queue job handler |
canx-websocket |
WebSocket server |
canx-event |
Event listener |
⚡ Commands
Open Command Palette (Ctrl+Shift+P / Cmd+Shift+P):
- Canx: Create Controller - Scaffold a new controller
- Canx: Create Model - Scaffold a new model
- Canx: Create Middleware - Scaffold custom middleware
- Canx: Create Migration - Scaffold database migration
- Canx: Create Seeder - Scaffold database seeder
- Canx: Create View - Scaffold JSX view component
- Canx: Show Info - Show extension info & links
Right-click on a folder in Explorer to quickly create:
⚙️ Configuration
Configure in Settings (canxjs.*):
canxjs.defaultPort - Default port (3000)
canxjs.useTypeScript - Use TypeScript (true)
Installation
From VSIX
code --install-extension vscode-canx-1.0.0.vsix
From Marketplace (Coming Soon)
Search "CanxJS" in VS Code Extensions.
Quick Start
- Open a CanxJS project
- Type
canx- to see all snippets
- Use
Ctrl+Shift+P → Canx: for commands
Links
License
MIT © 2024 CanxJS Team
| |