Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vandenberghinc/vweb
Easily create websites or REST APIs in javascript with vweb. Including a frontend api for building website's in an objective SwiftUI like manner. Supports payments using paddle.
https://github.com/vandenberghinc/vweb
api cpp http https javascript js rest-api vinc vlib website
Last synced: 10 days ago
JSON representation
Easily create websites or REST APIs in javascript with vweb. Including a frontend api for building website's in an objective SwiftUI like manner. Supports payments using paddle.
- Host: GitHub
- URL: https://github.com/vandenberghinc/vweb
- Owner: vandenberghinc
- Created: 2023-05-30T10:49:24.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-09-12T20:48:45.000Z (2 months ago)
- Last Synced: 2024-09-13T10:28:57.208Z (2 months ago)
- Topics: api, cpp, http, https, javascript, js, rest-api, vinc, vlib, website
- Language: JavaScript
- Homepage: https://vandenberghinc.github.io/vweb/
- Size: 47.9 MB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Easily create websites or REST APIs in pure c++ with the library VWeb. Website views are built in a SwiftUI like manner. The backend can run on on HTTP only or on HTTP and HTTPS both.
## In Development.
This library is currently still in development.## Documentation.
Full documentation at [Github Pages](https://vandenberghinc.github.io/vweb).## Project hierarchy.
When creating a website using vweb it is advised to create the following project hierarchy. The `server.js` file must either reside at `./server/server.js` or at `./server.js`.
```
website/
server/
config.js - Use this file to define the Server object and export it in module.exports either under the attribute `server` or as the export itself.
endpoints.js - For example use this file to define your endpoints.
server.js - Use this file to import the server and require all endpoints. This file must be named server.js for the vweb cli.
...
```###### config.js
```javascript
// Imports.
const vweb = require("@vandenberghinc/vweb");// Initialize the server.
const server = new vweb.Server({
...
})// Exports.
module.exports = {
server,
};
```###### endpoints.js
```javascript
// Imports.
const {server} = require("./config.js");// Create an endpoint.
server.endpoint({
...
});
```###### server.js
```javascript
// Imports.
const {server} = require("./config.js");// Load endpoints.
require("./endpoints.js");
```