Skip to content

vegeris/org-experimental-deno-reverse-string

Repository files navigation

Next-gen Slack platform project template - Reverse String

This repo contains a sample project and embedded lightweight SDK of a Typescript based project for the new Deno runtime.

The main file that handles the generation of your app's manifest is the manifest.ts file. So far it supports defining functions, types, and datastores. To define the runtime logic for functions, the source_file parameter should be set as a relative path from your project root to the file where that logic is defined and exported as default. The functions/reverse.ts file has a simple sample. After you create a new function, make sure you add it to the Manifest object in manifest.ts and point to your new function runtime log file.

Setup

Create a new project using this as repo as a template.

slack create -t slackapi/deno-reverse-string

Running it locally

slack run

Deploying to Slack's Hosting

slack deploy

Seeing it in action

After creating your app, you'll need to create a new trigger that will start the workflow.

slack trigger create --trigger-def ./trigger.ts

This provides a URL that you can now paste into your slack workspace to run the workflow! You can also add the url to the bookmarks bar of a channel!

Testing

You can write tests for your function, see functions/reverse_test.ts for a sample. Test base filenames should be suffixed with _test. To run tests just run:

slack deno test

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published