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
go build -o passwordless-social . | |
./passwordless-social |
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
psql -U postgres |
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
CREATE DATABASE passwordless_social; | |
\c passwordless_social |
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
export default { | |
env: process.env.NODE_ENV || 'development', | |
server: { | |
port: process.env.PORT || 8080, | |
}, | |
google: { | |
projectId: '<YOUR_PROJECT_ID>', | |
bucket: '<YOUR_BUCKET_NAME>', | |
}, | |
}; |
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
export default { | |
env: process.env.NODE_ENV || 'development', | |
server: { | |
port: process.env.PORT || 8080, | |
}, | |
google: { | |
projectId: '<YOUR_PROJECT_ID>', | |
bucket: '<YOUR_BUCKET_NAME>', | |
}, | |
}; |
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
import uuid from 'uuid/v4'; | |
import mime from 'mime-types'; | |
import { Storage } from '@google-cloud/storage'; | |
import config from '../config'; | |
exports.create = async (req, res, next) => { | |
const type = mime.lookup(req.file.originalname); | |
const storage = new Storage({ |
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
import uuid from 'uuid/v4'; | |
import multer from 'multer'; | |
import Upload from '../controllers/upload'; | |
import config from '../config'; | |
module.exports = api => { | |
api.route('/upload').post(multer().single('image'), Upload.create); | |
}; |
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
const client = stream.connect(key, secret); | |
module.exports.token = (event, context, callback) => { | |
const data = JSON.parse(event.body); | |
const token = client.createUserSessionToken(data.user); | |
const response = { | |
statusCode: 200, | |
headers: { |
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
session.feed('user').follow('user', userIdOfUserThatShouldBeFollowed); |
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
serverless invoke local --function crawl |