Skip to content

Instantly share code, notes, and snippets.

View govi218's full-sized avatar
👾

Govind Mohan govi218

👾
View GitHub Profile
@govi218
govi218 / generate-supabase-enums.md
Created May 6, 2024 05:08 — forked from serhii-levchenko/generate-supabase-enums.md
Generate enums based on Supabase types

Currently Supabase generates only types by default but it can be useful to have enums. That's how you can do it:

  1. Add your own script in package.json e.g. "generate:enums": "node ./scripts/generate-enums.js"

  2. Create ./scripts/generate-enums.js file

const fs = require('fs');
const ts = require('typescript');
@govi218
govi218 / index.js
Created November 29, 2016 22:09
main file for implementing chatbot with heroku
'use strict'
const express = require('express')
const bodyParser = require('body-parser')
const request = require('request')
const app = express()
app.set('port', (process.env.PORT || 5000))
// Process application/x-www-form-urlencoded