Boost your development workflow with Enhance, a backend-first web framework that simplifies building scalable apps. This approach prioritizes server-side logic first, then layers in frontend features as needed—perfect for rapid prototyping or small projects.
File Structure Gist
Async Code Example
Server Code Example
Frontend Example
Run the app:
node server.js
Open: http://localhost:3000/
Database Commands Gist
With these steps, you’ll build a fully functional, backend-driven app quickly—ideal for prototyping or scalable projects.
Quick Start Summary (For Beginners)
- Install Enhance + SQLite
- Create project structure
- Build database with SQLite
- Add async logic for smooth performance
- Set up the server using Node.js
- Design a simple frontend (HTML)
- Run the app & test in browser
Why Choose Enhance?
- Minimal JavaScript → Faster pages, better accessibility.
- Functions as endpoints → No complex APIs needed.
- Built-in JSON serialization → Smooth data exchange.
Step 1: Install Dependencies
Install Enhance and SQLite: installation Code GistStep 2: Set Up Project Structure
Create a notes-app folder and add core files:File Structure Gist
Step 3: Build the SQLite Database
Use db.js for data persistence:- Stores id, title, and content.
- CommonJS syntax (switch to ES Modules if needed).
Step 4: Add Async Logic
Keep operations non-blocking with async functions:Async Code Example
Step 5: Build the Server
Create server.js using Node’s built-in HTTP module:Server Code Example
Step 6: Create the Frontend
Start with index.html or connect a frontend framework later:Frontend Example
Run the app:
node server.js
Open: http://localhost:3000/
Step 7: Access the Database
Use SQL commands in the terminal:Database Commands Gist
Extra Features of Enhance
- Zero-JavaScript by default → blazing-fast pages.
- Layer JavaScript only when needed.
- Serverless-ready → simple deployment to cloud.