Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update SDK to use fetchEvent #244

Merged
merged 7 commits into from
Jun 17, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Spin JS SDK

This is an SDK for Javascript and Typescript based on [componentize-js](https://github.com/bytecodealliance/ComponentizeJS).
karthik2804 marked this conversation as resolved.
Show resolved Hide resolved


## Installing the templates

[Spin](https://github.com/fermyon/spin) is a prerequisite.

The templates can be installed with the following command:

```bash
spin plugin install --update --git https://github.com/fermyon/spin-js-sdk --branch feat/sdk-v2
```

## Creating and Building a new app=
karthik2804 marked this conversation as resolved.
Show resolved Hide resolved

```bash
spin new -t http-ts hello-world -a
cd hello-world
npm install
spin buiild
```

## Running the app

```bash
spin up
```

## Note: Installing the package

Currently pre-release versionf are published on NPM and can be installed using the following command:
karthik2804 marked this conversation as resolved.
Show resolved Hide resolved

```bash
npm install @fermyon/spin-sdk@next
```
1 change: 1 addition & 0 deletions bin/wit/spin.wit
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package fermyon:[email protected];

world spin-imports {
import wasi:http/[email protected];
include wasi:cli/[email protected];
import llm;
import redis;
import postgres;
Expand Down
Loading
Loading