This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//client-side code | |
const formik = useFormik({ | |
initialValues: { | |
username: '', | |
bio: '', | |
img: '' | |
}, | |
onSubmit: async (values) => { | |
let data = new FormData(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
useful when testing lamdas for s3 buckets | |
{ | |
"Records":[ | |
{ | |
"eventVersion":"2.2", | |
"eventSource":"aws:s3", | |
"awsRegion":"us-west-2", | |
"eventTime":"The time, in ISO-8601 format, for example, 1970-01-01T00:00:00.000Z, when Amazon S3 finished processing the request", | |
"eventName":"event-type", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"log" | |
"net/http" | |
"os" | |
"github.com/gorilla/websocket" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//install react-app-rewired and all the broswerify packages | |
const webpack = require('webpack'); | |
module.exports = function override(config) { | |
const fallback = config.resolve.fallback || {}; | |
Object.assign(fallback, { | |
"crypto": require.resolve("crypto-browserify"), | |
"stream": require.resolve("stream-browserify"), | |
"assert": require.resolve("assert"), | |
"http": require.resolve("stream-http"), |