Fetch Data with Promise - Wix-corvid Typing CST Test
Loading…
Fetch Data with Promise — Wix-corvid Code
Uses a Promise to fetch data from a collection asynchronously.
// backend/fetchData.jsw
import wixData from 'wix-data';
export function getItemsAsync() {
return new Promise((resolve, reject) => {
wixData.query('MyCollection').find()
.then(res => resolve(res.items))
.catch(err => reject(err));
});
}
$w.onReady(function () {
getItemsAsync().then(console.log);
});Wix-corvid Language Guide
Wix Velo (formerly Corvid) is a full-stack development platform built into Wix, allowing developers to create dynamic web applications with custom interactions, databases, and backend logic using JavaScript and Wix APIs.
Primary Use Cases
- ▸Creating dynamic pages from database collections
- ▸Custom forms and workflows
- ▸E-commerce functionality enhancements
- ▸Integrating third-party APIs
- ▸Building web apps with backend logic on Wix
Notable Features
- ▸Full-stack JavaScript environment
- ▸Integrated database collections
- ▸Wix APIs for UI and backend
- ▸Custom interactions and event handling
- ▸Secure serverless backend functions
Origin & Creator
Developed by Wix.com, originally launched as Corvid in 2017, later rebranded as Velo.
Industrial Note
Velo is widely adopted for small-to-medium businesses needing dynamic web apps, internal tools, booking systems, and e-commerce customizations without leaving the Wix ecosystem.