slackin-swift
slackin-swift copied to clipboard
Invite people to your public slack instance - but in Swift!
Create a landing page invited for a Slack instance you want people to join.
Heavily inspired, obviously, by slackin.
Want to see it working live? Go here, which is an inviter to my Weekly Peer Lab in Austin, Texas.
Requirements
- Swift 4.2
- macOS 10.13 / Ubuntu 14.04
- Xcode 10.1
- a Slack legacy token - get one for your org here.
- Cloud Foundry container on IBM Cloud with at least 128MB of application memory
Contribute
See the contribute file!
PRs accepted.
Small note: If editing the README, please conform to the standard-readme specification.
Building the Project
- Clone this repo.
- From the root directory, run
swift build. - From the root directory, run
swift package generate-xcodeproj.
Running in Xcode
- Create a file in your
~/Documentsdirectory calledslackkey.txt. - For the slack you want to run this with, make the only contents of that file the legacy slack token you are working with.
- Save the file.
When you run this in Xcode, if you don't provide a token as a command line argument, it will search for this file and read it, and use that. You can debug on main.swift to see what it's doing.
If you run this from the command line, you'll want to run:
.build/debug/slackin-swift **insert token here**
Running in Docker
There is a run script provided with the repository titled runDocker that utilizes a local Dockerfile for running the app, and Dockerfile-tools for building the app. The script takes one parameter, so execute the script like so:
./runDocker **insert token here**
Note that, in the script, the names of the images created can be modified, but everything is consistently named for the sake of simplicity.
Deploying to Cloud Foundry
- Set up a Cloud Foundry Swift application.
- Use the IBM Cloud CLI to target the right organization.
- Use the command
ibmcloud app push -c 'slackin-swift **your token here**'to deploy.
Deploying to Kubernetes with Docker
Coming soon...
License
MIT © 2019 David Okun