GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Ask for PRs · SatsCzar/nullstack.github.io@c9403e9

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • i18n
    • en-US/examples
      • using-nullstack-to-build-a-desktop-application.md
      • using-nullstack-to-build-a-mobile-application.md
    • pt-BR
      • components
        • Examples.yml
      • examples
        • using-nullstack-as-a-web-api.md
        • using-nullstack-to-build-a-chrome-extension.md
        • using-nullstack-to-build-a-desktop-application.md
        • using-nullstack-to-build-a-mobile-application.md
        • using-nullstack-to-build-a-personal-portfolio-on-github.md
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎i18n/en-US/examples/using-nullstack-to-build-a-desktop-application.md‎

Copy file name to clipboardExpand all lines: i18n/en-US/examples/using-nullstack-to-build-a-desktop-application.md
+3-1Lines changed: 3 additions & 1 deletion
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,6 @@
22
title: "Using Nullstack to build a Desktop Application"
33
description: "Nullstack can be used to build a Desktop Application"
44
---
5-
Nullstack can be used as to build a Desktop Application with Electron.
5+
Nullstack can be used as to build a Desktop Application with Electron.
6+
7+
If you'd like to help complete this example, feel free to [send us a PR](https://github.com/nullstack/nullstack.github.io).
Collapse file

‎i18n/en-US/examples/using-nullstack-to-build-a-mobile-application.md‎

Copy file name to clipboardExpand all lines: i18n/en-US/examples/using-nullstack-to-build-a-mobile-application.md
+3-1Lines changed: 3 additions & 1 deletion
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,6 @@
22
title: "Using Nullstack to build a Mobile Application"
33
description: "Nullstack can be used to build a Mobile Application"
44
---
5-
Nullstack can be used as to build a Mobile Application with Capacitor.
5+
Nullstack can be used as to build a Mobile Application.
6+
7+
If you'd like to help complete this example, feel free to [send us a PR](https://github.com/nullstack/nullstack.github.io).
Collapse file

‎i18n/pt-BR/components/Examples.yml‎

Copy file name to clipboardExpand all lines: i18n/pt-BR/components/Examples.yml
+13-5Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,16 @@ contribute: "We accept guest examples! You can write it up in markdown and open
66
posts:
77
- title: "Using Nullstack as a Web API"
88
href: "/examples/using-nullstack-as-a-web-api"
9-
description: "Nullstack can be used as a web API, and this example shows how to do it."
10-
date: "Apr, 2023"
11-
author:
12-
name: Bruno Michels
13-
handle: BrunoLM
9+
description: "Nullstack can be used as a web API, you can write your own endpoints or expose server functions."
10+
- title: "Using Nullstack to build a Chrome Extension"
11+
href: "/examples/using-nullstack-to-build-a-chrome-extension"
12+
description: "Nullstack can be used to build a Chrome Extension."
13+
- title: "Using Nullstack to build a Desktop Application"
14+
href: "/examples/using-nullstack-to-build-a-desktop-application"
15+
description: "Nullstack can be used to build a Desktop Application."
16+
- title: "Using Nullstack to build a Mobile Application"
17+
href: "/examples/using-nullstack-to-build-a-mobile-application"
18+
description: "Nullstack can be used to build a Mobile Application."
19+
- title: "Using Nullstack to build a personal Portfolio on GitHub"
20+
href: "/examples/using-nullstack-to-build-a-personal-portfolio-on-github"
21+
description: "Nullstack can be used to build a personal Portfolio on GitHub."
Collapse file

‎i18n/pt-BR/examples/using-nullstack-as-a-web-api.md‎

Copy file name to clipboard
+33-6Lines changed: 33 additions & 6 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,36 @@
11
---
22
title: "Using Nullstack as a Web API"
3-
description: "Nullstack can be used as a web API, and this example shows how to do it."
4-
date: "Apr, 2023"
5-
author:
6-
name: Bruno Michels
7-
handle: BrunoLM
3+
description: "Nullstack can be used as a web API, you can write your own endpoints or expose server functions."
84
---
9-
example
5+
Nullstack can be used as a Web API. Nullstack runs an Express server behind the scenes allowing you to configure your own routes and build a fully customized Web API.
6+
7+
You can configure the Express routes by using the `server` object available in the Nullstack Context on `server.js`.
8+
9+
```js
10+
// server.js
11+
import Nullstack from 'nullstack';
12+
import Application from './src/Application';
13+
14+
const context = Nullstack.start(Application);
15+
16+
context.server.get('/api/waifus', (request, response) => {
17+
response.json({waifus: []});
18+
});
19+
20+
export default context;
21+
```
22+
23+
It's also possible to expose server functions from your components to be in the web API. Instead of using a function that a `request` and a `response` pass the static function from your component to the express route.
24+
25+
```js
26+
// server.js
27+
import Nullstack from 'nullstack';
28+
import Application from './src/Application';
29+
import WaifuComponent from './src/WaifuComponent';
30+
31+
const context = Nullstack.start(Application);
32+
33+
context.server.get('/waifus', WaifuComponent.getWaifus)
34+
35+
export default context;
36+
```
Collapse file

‎i18n/pt-BR/examples/using-nullstack-to-build-a-chrome-extension.md‎

Copy file name to clipboard
+14Lines changed: 14 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
title: "Using Nullstack to build a Chrome Extension"
3+
description: "Nullstack can be used to build a Chrome Extension"
4+
---
5+
Nullstack can be used as to build a Chrome Extension.
6+
7+
These are all the changes required to make the app compatible as an extension:
8+
9+
- `public/manifest.json` creates the Chrome Extension manifest file
10+
- `server.js` disables the default service worker, as the extension doesn't need it
11+
- `src/Application.jsx` is the entry component that will render the Popup code
12+
- `package.json` sets mode to SPA (default mode) and enables writing files to disk
13+
14+
You can find a full example at [Mortaro/nullstack-chrome-extension](https://github.com/Mortaro/nullstack-chrome-extension).
Collapse file

‎i18n/pt-BR/examples/using-nullstack-to-build-a-desktop-application.md‎

Copy file name to clipboard
+7Lines changed: 7 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
title: "Using Nullstack to build a Desktop Application"
3+
description: "Nullstack can be used to build a Desktop Application"
4+
---
5+
Nullstack can be used as to build a Desktop Application with Electron.
6+
7+
If you'd like to help complete this example, feel free to [send us a PR](https://github.com/nullstack/nullstack.github.io).
Collapse file

‎i18n/pt-BR/examples/using-nullstack-to-build-a-mobile-application.md‎

Copy file name to clipboard
+7Lines changed: 7 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
title: "Using Nullstack to build a Mobile Application"
3+
description: "Nullstack can be used to build a Mobile Application"
4+
---
5+
Nullstack can be used as to build a Mobile Application.
6+
7+
If you'd like to help complete this example, feel free to [send us a PR](https://github.com/nullstack/nullstack.github.io).
Collapse file

‎i18n/pt-BR/examples/using-nullstack-to-build-a-personal-portfolio-on-github.md‎

Copy file name to clipboard
+7Lines changed: 7 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
title: "Using Nullstack to build a personal Portfolio on GitHub"
3+
description: "Nullstack can be used to build a personal Portfolio on GitHub"
4+
---
5+
Nullstack can be used to build a personal Portfolio on GitHub.
6+
7+
Check out how to [deploy your website to GitHub pages](/how-to-deploy-to-github-pages).

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.