Facecamp lets you take an animated gif from desktop or mobile by connecting the app to Slack and then visiting face.camp to post yourself to Slack for your teamies to see.
npm install
If you only want to develop the UI (and not any of the server functions), the easiest way to do that is to take your token from face.camp and paste it into your locally running app.
- Start the local app with
npm start
- Go to face.camp and if you are not authenticated, complete the login flow to signin with Slack
- Open the developer console and paste the following and press Enter:
((k)=>copy(`localStorage.setItem('${k}',${JSON.stringify(localStorage.getItem(k))})`))('facecamp-data')
- This will copy your local Slack token to your clipboard
- Go to your local app at http://localhost:8080 and open the developer console
- Paste the contents of your clipboard and press Enter
- Your local app should now show you as authenticated
You'll need a Slack app with a client id and secret to run the server functions. Go to your Slack app's page to get or create your app. Then use the configuration values for that app to setup and run the authentication lambda functions. Once you have your client id and secret:
- Start the local app with
npm start
- Put
DEV_CLIENT_ID=YOUR_CLIENT_ID
andDEV_CLIENT_SECRET=YOUR_CLIENT_SECRET
in.env
- Start the functions server with
npm run functions:start
- The app will proxy all the API requests to the locally running functions server
- Find your development server URL from the output of
npm start
(it should be http://localhost:8080) - Go to your Slack app's "OAuth & Permissions" settings and add your development server as a redirect url. Note that this url will only affect instances of the server running with the
DEV_CLIENT_ID
andDEV_CLIENT_SECRET
. Any changes to production OAuth redirect URLs need to be reviewed by Slack.
- Follow the instructions above from the "Using the server functions" section
- Make sure to use the local IP address version of the development URL for the redirect url
This app gets built as static files that can be hosted anywhere. Run the following commands to build a production ready version to the build/
directory.
npm run build
If you'd like to test the production version locally, you can run the following command which will serve whatever files are in the build/
directory.
npx serve -s build
Follow the guidelines in the contribution docs.
Credit to @latentflip's gifhu.gs from which I took the initial implementation for the getUserMedia -> gif code.
MIT