Skip to content

Commit 62805bc

Browse files
authored
Merge pull request #5 from erikkai/patch-2
GET
2 parents 23675ae + 7c99c87 commit 62805bc

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

index.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,21 @@
1+
// Example Application for Frame.io's custom action feature.
2+
13
const express = require('express');
24
const bodyParser = require('body-parser');
35
const app = express();
46
const port = process.env.PORT || 3000;
57

68
app.use(bodyParser.json());
79

10+
// GET is not used with custom actions, but tools like Glitch or Postman are often set to try a GET request.
11+
// This is provided so you don't receive a 'Can't GET' notification.
12+
13+
app.get('/', function (req, res) {
14+
res.end('Hello World');
15+
});
16+
17+
// Send a POST request to /actions to create a form in the Frame.io web app
18+
819
app.post('/actions', function (req, res) {
920
if (req.body.data) {
1021
const { name, color } = req.body.data;

0 commit comments

Comments
 (0)