This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <script context="module"> | |
| export async function load({ fetch, page }) { | |
| let article; | |
| try { | |
| // here we are gonna fetch the single article by id | |
| article = await fetch(`https://dev.to/api/articles/${page.params.slug}`); | |
| article = await article.json(); | |
| } catch (e) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <script context="module"> | |
| // this script fetch the posts from the api | |
| // https://svelte.dev/docs#script_context_module | |
| // this is runned on load (check svelKit doc) | |
| export async function load({ fetch }) { | |
| let articles; | |
| try { | |
| // here you should type your dev.to username |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const stringio = require('@rauschma/stringio'); | |
| const child = require('child_process'); | |
| const start = child.spawn(`java -Xms512M -Xmx1024M -jar ./TEST-FILE.jar`, | |
| [], { shell: true }); | |
| async function writeToWritable(writable, data) { | |
| console.log("WRITABLE", writable); | |
| //await stringio.streamWrite(writable, data); |
NewerOlder