This file contains hidden or 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
'use strict' | |
/** @type {import('@adonisjs/lucid/src/Schema')} */ | |
const Schema = use('Schema') | |
class UserSchema extends Schema { | |
up () { | |
this.create('users', (table) => { | |
table.increments() | |
table.string('username', 80).notNullable().unique() |
This file contains hidden or 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
'use strict' | |
//The line below provides intelisense. to make use of intelisense run the following command in your terminal | |
// npm install -g typescript | |
/** @type {typeof import('@adonisjs/framework/src/Route/Manager')} */ | |
const Route = use('Route') | |
Route.group(() => { | |
Route.post("/register", "UserController.register") |
This file contains hidden or 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
{ | |
attachments: [], | |
headers: Map { | |
'received' => 'by mail-ej1-f51.google.com with SMTP id g19so1476929ejc.9 for <[email protected]>; Fri, 21 Aug 2020 02:17:48 -0700 (PDT)', | |
'dkim-signature' => { value: 'v=1', params: [Object] }, | |
'x-google-dkim-signature' => 'v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=dL0Nwp6I5xpmGn/j0DjLSoqXJGn1tmuKaQvGgQVDO58=; b=ilhqQTqwcMsYsTAQhPeQcZcKLdGHlSRXkj7JlVlaNM/LveQxrxfP2XLAEdrU1tNUdh n4MxNoR+e14UADfkvWEvLvp2D/uWCAds1zTJL1Y/zNPAtSqsrbH/WVwK8lKssyOY6xJh AfbqihVFjJuCm+1hYNUo3aG9bSJuY9ErwcGRmvAL+wyY7PBF7yJEUy9J8NAmtWL4Mb2I grgOFzLgV43+FFiJgLueKf5WaNnvJg+u5IQdRoNOYj96BW9uZD0bv3b0EZ2Ley+C+317 dGFclrj9YkHwqpGaX5OrIor35kuHOyGDW6x6maNPjm2fgm6okyi4HtfKH6FGQRcRhdVM 8v1Q==', | |
'x-gm-message-state' => 'AOAM53123zanIzwVl6a+2/n7C/6GZYhMNfWQUESL43MwbOk+c7bizgr4 HGRZQCTOmmDVkq98M0gewGmyzP0ilDqhynnZwYXZSM6hdl0=', | |
'x-google-smtp-source' => 'ABdhPJySlPgTXcQzQzTj5PoY4AaFrtyevfHHfgaC5cZmIvyV |
This file contains hidden or 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 SMTPServer = require("smtp-server").SMTPServer; | |
const parser = require("mailparser").simpleParser | |
const server = new SMTPServer({ | |
onData(stream, session, callback) { | |
parser(stream, {}, (err, parsed) => { | |
if (err) | |
console.log("Error:" , err) | |
console.log(parsed) |
This file contains hidden or 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
var AWS = require('aws-sdk') | |
var s3 = new AWS.S3({ | |
accessKeyId: 'admin', | |
secretAccessKey: 'password', | |
endpoint: 'http://localhost:9001', | |
s3ForcePathStyle: true, | |
signatureVersion: 'v4' | |
}) |
This file contains hidden or 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
version: '3.7' | |
# starts 4 docker containers running minio server instances. Each | |
# minio server's web interface will be accessible on the host at port | |
# 9001 through 9004. | |
services: | |
minio1: | |
image: minio/minio:RELEASE.2020-08-18T19-41-00Z | |
volumes: | |
- data1-1:/data1 |
This file contains hidden or 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
version: "3" | |
services: | |
websocketserver: | |
image: microservices_websocket_server:latest | |
ports: | |
- 8088:8088 | |
twitterclient: | |
image: microservices_twitter_client:latest | |
depends_on: | |
- websocketserver |
This file contains hidden or 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
FROM node:12-alpine | |
RUN npm install -g http-server | |
WORKDIR /app | |
COPY package*.json ./ | |
RUN npm install |
This file contains hidden or 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
this.connection = new WebSocket(process.env.VUE_APP_WEBSOCKET_SERVER_URL); |
This file contains hidden or 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
FROM node:12-alpine | |
WORKDIR /app | |
COPY package*.json ./ | |
RUN npm install | |
COPY app.js . |