├── .angular-cli.json
├── .editorconfig
├── .gitignore
├── .vscode
└── settings.json
├── README.md
├── e2e
├── app.e2e-spec.ts
├── app.po.ts
└── tsconfig.json
├── karma.conf.js
├── package.json
├── protractor.conf.js
├── server
├── app.js
├── cert.pem
├── data.js
├── getPuns.js
├── key.pem
├── keytmp.pem
├── server.csr
├── server.key
└── suggestKeywords.js
├── src
├── app
│ ├── app.component.css
│ ├── app.component.html
│ ├── app.component.spec.ts
│ ├── app.component.ts
│ ├── app.module.ts
│ ├── dialog-suggestion
│ │ ├── dialog-suggestion.component.css
│ │ ├── dialog-suggestion.component.html
│ │ ├── dialog-suggestion.component.spec.ts
│ │ └── dialog-suggestion.component.ts
│ ├── google-vision.service.spec.ts
│ ├── google-vision.service.ts
│ ├── pun-lookup
│ │ ├── pun-lookup.component.html
│ │ └── pun-lookup.component.ts
│ ├── pun-service.service.spec.ts
│ ├── pun-service.service.ts
│ ├── snapshot-camera
│ │ ├── snapshot-camera.component.css
│ │ ├── snapshot-camera.component.html
│ │ ├── snapshot-camera.component.spec.ts
│ │ └── snapshot-camera.component.ts
│ ├── speech.service.spec.ts
│ └── speech.service.ts
├── assets
│ └── .gitkeep
├── environments
│ ├── environment.prod.ts
│ └── environment.ts
├── favicon.ico
├── index.html
├── main.ts
├── polyfills.ts
├── styles.css
├── test.ts
├── tsconfig.app.json
├── tsconfig.spec.json
└── typings.d.ts
├── tsconfig.json
└── tslint.json
/.angular-cli.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "./node_modules/@angular/cli/lib/config/schema.json",
3 | "project": {
4 | "name": "rxjs-test"
5 | },
6 | "apps": [
7 | {
8 | "root": "src",
9 | "outDir": "dist",
10 | "assets": [
11 | "assets",
12 | "favicon.ico"
13 | ],
14 | "index": "index.html",
15 | "main": "main.ts",
16 | "polyfills": "polyfills.ts",
17 | "test": "test.ts",
18 | "tsconfig": "tsconfig.app.json",
19 | "testTsconfig": "tsconfig.spec.json",
20 | "prefix": "app",
21 | "styles": [
22 | "styles.css"
23 | ],
24 | "scripts": [],
25 | "environmentSource": "environments/environment.ts",
26 | "environments": {
27 | "dev": "environments/environment.ts",
28 | "prod": "environments/environment.prod.ts"
29 | }
30 | }
31 | ],
32 | "e2e": {
33 | "protractor": {
34 | "config": "./protractor.conf.js"
35 | }
36 | },
37 | "lint": [
38 | {
39 | "project": "src/tsconfig.app.json",
40 | "exclude": "**/node_modules/**"
41 | },
42 | {
43 | "project": "src/tsconfig.spec.json",
44 | "exclude": "**/node_modules/**"
45 | },
46 | {
47 | "project": "e2e/tsconfig.e2e.json",
48 | "exclude": "**/node_modules/**"
49 | }
50 | ],
51 | "test": {
52 | "karma": {
53 | "config": "./karma.conf.js"
54 | }
55 | },
56 | "defaults": {
57 | "styleExt": "css",
58 | "component": {}
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/.editorconfig:
--------------------------------------------------------------------------------
1 | # Editor configuration, see http://editorconfig.org
2 | root = true
3 |
4 | [*]
5 | charset = utf-8
6 | indent_style = space
7 | indent_size = 2
8 | insert_final_newline = true
9 | trim_trailing_whitespace = true
10 |
11 | [*.md]
12 | max_line_length = off
13 | trim_trailing_whitespace = false
14 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # See http://help.github.com/ignore-files/ for more about ignoring files.
2 |
3 | # compiled output
4 | /dist
5 | /dist-server
6 | /tmp
7 | /out-tsc
8 |
9 | # dependencies
10 | /node_modules
11 |
12 | # IDEs and editors
13 | /.idea
14 | .project
15 | .classpath
16 | .c9/
17 | *.launch
18 | .settings/
19 |
20 | # IDE - VSCode
21 | .vscode/*
22 | !.vscode/settings.json
23 | !.vscode/tasks.json
24 | !.vscode/launch.json
25 | !.vscode/extensions.json
26 |
27 | # misc
28 | /.sass-cache
29 | /connect.lock
30 | /coverage
31 | /libpeerconnection.log
32 | npm-debug.log
33 | testem.log
34 | /typings
35 |
36 | # e2e
37 | /e2e/*.js
38 | /e2e/*.map
39 |
40 | #System Files
41 | .DS_Store
42 | Thumbs.db
43 |
44 | #API Key File
45 | /src/app/api.key.ts
--------------------------------------------------------------------------------
/.vscode/settings.json:
--------------------------------------------------------------------------------
1 | {
2 | "typescript.tsdk": "./node_modules/typescript/lib"
3 | }
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # RxjsTest
2 |
3 | This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 1.7.0.
4 |
5 | ## Development server
6 |
7 | Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
8 |
9 | ## Code scaffolding
10 |
11 | Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.
12 |
13 | ## Build
14 |
15 | Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `-prod` flag for a production build.
16 |
17 | ## Running unit tests
18 |
19 | Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
20 |
21 | ## Running end-to-end tests
22 |
23 | Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/).
24 |
25 | ## Further help
26 |
27 | To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).
28 |
--------------------------------------------------------------------------------
/e2e/app.e2e-spec.ts:
--------------------------------------------------------------------------------
1 | import { RxjsTestPage } from './app.po';
2 |
3 | describe('rxjs-test App', function() {
4 | let page: RxjsTestPage;
5 |
6 | beforeEach(() => {
7 | page = new RxjsTestPage();
8 | });
9 |
10 | it('should display message saying app works', () => {
11 | page.navigateTo();
12 | expect(page.getParagraphText()).toEqual('app works!');
13 | });
14 | });
15 |
--------------------------------------------------------------------------------
/e2e/app.po.ts:
--------------------------------------------------------------------------------
1 | import { browser, element, by } from 'protractor';
2 |
3 | export class RxjsTestPage {
4 | navigateTo() {
5 | return browser.get('/');
6 | }
7 |
8 | getParagraphText() {
9 | return element(by.css('app-root h1')).getText();
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/e2e/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compileOnSave": false,
3 | "compilerOptions": {
4 | "declaration": false,
5 | "emitDecoratorMetadata": true,
6 | "experimentalDecorators": true,
7 | "module": "commonjs",
8 | "moduleResolution": "node",
9 | "outDir": "../dist/out-tsc-e2e",
10 | "sourceMap": true,
11 | "target": "es5",
12 | "typeRoots": [
13 | "../node_modules/@types"
14 | ]
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/karma.conf.js:
--------------------------------------------------------------------------------
1 | // Karma configuration file, see link for more information
2 | // https://karma-runner.github.io/1.0/config/configuration-file.html
3 |
4 | module.exports = function (config) {
5 | config.set({
6 | basePath: '',
7 | frameworks: ['jasmine', '@angular/cli'],
8 | plugins: [
9 | require('karma-jasmine'),
10 | require('karma-chrome-launcher'),
11 | require('karma-jasmine-html-reporter'),
12 | require('karma-coverage-istanbul-reporter'),
13 | require('@angular/cli/plugins/karma')
14 | ],
15 | client:{
16 | clearContext: false // leave Jasmine Spec Runner output visible in browser
17 | },
18 | coverageIstanbulReporter: {
19 | reports: [ 'html', 'lcovonly' ],
20 | fixWebpackSourcePaths: true
21 | },
22 | angularCli: {
23 | environment: 'dev'
24 | },
25 | reporters: ['progress', 'kjhtml'],
26 | port: 9876,
27 | colors: true,
28 | logLevel: config.LOG_INFO,
29 | autoWatch: true,
30 | browsers: ['Chrome'],
31 | singleRun: false
32 | });
33 | };
34 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "rxjs-test",
3 | "version": "0.0.0",
4 | "license": "MIT",
5 | "scripts": {
6 | "ng": "ng",
7 | "start": "ng serve",
8 | "build": "ng build --prod",
9 | "test": "ng test",
10 | "lint": "ng lint",
11 | "e2e": "ng e2e"
12 | },
13 | "private": true,
14 | "dependencies": {
15 | "@angular/animations": "^5.2.0",
16 | "@angular/cdk": "^5.2.1",
17 | "@angular/common": "^5.2.0",
18 | "@angular/compiler": "^5.2.0",
19 | "@angular/core": "^5.2.0",
20 | "@angular/forms": "^5.2.0",
21 | "@angular/http": "^5.2.0",
22 | "@angular/material": "^5.2.1",
23 | "@angular/platform-browser": "^5.2.0",
24 | "@angular/platform-browser-dynamic": "^5.2.0",
25 | "@angular/router": "^5.2.0",
26 | "core-js": "^2.4.1",
27 | "cors": "^2.8.4",
28 | "express": "^4.16.2",
29 | "hammerjs": "^2.0.8",
30 | "rxjs": "^5.5.6",
31 | "zone.js": "^0.8.19"
32 | },
33 | "devDependencies": {
34 | "@angular/cli": "~1.7.0",
35 | "@angular/compiler-cli": "^5.2.0",
36 | "@angular/language-service": "^5.2.0",
37 | "@types/jasmine": "~2.8.3",
38 | "@types/jasminewd2": "~2.0.2",
39 | "@types/node": "~6.0.60",
40 | "codelyzer": "^4.0.1",
41 | "jasmine-core": "~2.8.0",
42 | "jasmine-spec-reporter": "~4.2.1",
43 | "karma": "~2.0.0",
44 | "karma-chrome-launcher": "~2.2.0",
45 | "karma-coverage-istanbul-reporter": "^1.2.1",
46 | "karma-jasmine": "~1.1.0",
47 | "karma-jasmine-html-reporter": "^0.2.2",
48 | "protractor": "~5.1.2",
49 | "ts-node": "~4.1.0",
50 | "tslint": "~5.9.1",
51 | "typescript": "~2.5.3"
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/protractor.conf.js:
--------------------------------------------------------------------------------
1 | // Protractor configuration file, see link for more information
2 | // https://github.com/angular/protractor/blob/master/lib/config.ts
3 |
4 | const { SpecReporter } = require('jasmine-spec-reporter');
5 |
6 | exports.config = {
7 | allScriptsTimeout: 11000,
8 | specs: [
9 | './e2e/**/*.e2e-spec.ts'
10 | ],
11 | capabilities: {
12 | 'browserName': 'chrome'
13 | },
14 | directConnect: true,
15 | baseUrl: 'http://localhost:4200/',
16 | framework: 'jasmine',
17 | jasmineNodeOpts: {
18 | showColors: true,
19 | defaultTimeoutInterval: 30000,
20 | print: function() {}
21 | },
22 | onPrepare() {
23 | require('ts-node').register({
24 | project: 'e2e/tsconfig.e2e.json'
25 | });
26 | jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
27 | }
28 | };
29 |
--------------------------------------------------------------------------------
/server/app.js:
--------------------------------------------------------------------------------
1 | const fs = require('fs');
2 | const https = require('https');
3 | const path = require('path');
4 | const privateKey = fs.readFileSync(path.join(__dirname, './key.pem'), 'utf8');
5 | const certificate = fs.readFileSync(path.join(__dirname, './cert.pem'), 'utf8');
6 | const credentials = {key: privateKey, cert: certificate};
7 | const cors = require('cors');
8 | const express = require('express');
9 | const app = express();
10 | const { Observable } = require('rxjs');
11 | const getPuns = require('./getPuns');
12 | const suggestKeywords = require('./suggestKeywords');
13 |
14 | app.use(cors());
15 |
16 | app.get('/suggest-keywords', (req, res) => {
17 | const q = req.query.q;
18 | const keywords = suggestKeywords(q);
19 | res.send(keywords);
20 | });
21 |
22 | app.get('/puns', (req, res) => {
23 | const keywords = req.query.q ? req.query.q.split(',') : null;
24 | const puns = getPuns(keywords);
25 | res.send(puns);
26 | });
27 |
28 |
29 | const httpsServer = https.createServer(credentials, app);
30 |
31 | httpsServer.listen(4201);
--------------------------------------------------------------------------------
/server/cert.pem:
--------------------------------------------------------------------------------
1 | -----BEGIN CERTIFICATE-----
2 | MIIEVzCCAz+gAwIBAgIJALanIPw4+44cMA0GCSqGSIb3DQEBBQUAMHoxCzAJBgNV
3 | BAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMREwDwYDVQQHEwhTYW4gSm9zZTEQ
4 | MA4GA1UEChMHVGhpc0RvdDERMA8GA1UEAxMIQmVuIExlc2gxHjAcBgkqhkiG9w0B
5 | CQEWD2JlbkBiZW5sZXNoLmNvbTAeFw0xNzAzMjQwNzI3NDNaFw0xODAzMjQwNzI3
6 | NDNaMHoxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMREwDwYDVQQH
7 | EwhTYW4gSm9zZTEQMA4GA1UEChMHVGhpc0RvdDERMA8GA1UEAxMIQmVuIExlc2gx
8 | H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ox0Z29LkrtriJRwfLeidt
24 | PmxF0oMyJUi6FXUlae0SUjsnoz7wl8EX7LW7XU/rVAauoxcocbRJbmqTh9vgBtsh
25 | VL+MyxoD94CVG4U=
26 | -----END CERTIFICATE-----
27 |
--------------------------------------------------------------------------------
/server/data.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | keywords: {
3 | 'banana': [0, 13, 14, 15, 16],
4 | 'cheese': [3, 4, 5, 6, 7, 8, 12, 17, 23],
5 | 'bird': [3, 11, 12, 1, 20],
6 | 'hotel': [4, 9, 10, 11],
7 | 'mexican': [6, 17, 21, 22, 23, 24, 25],
8 | 'cow': [12, 26, 27, 28, 29, 30, 31],
9 | 'egg': [18, 19, 20, 32, 33],
10 | 'food': [0, 13, 14, 15, 16, 3, 4, 5, 6, 7, 8, 12, 23, 18, 19, 20, 32, 33]
11 | },
12 |
13 | puns: {
14 | '0': {
15 | pun: 'My wife has banana diet',
16 | answer: 'She hasnt lost weight, but you should see her climb trees now!'
17 | },
18 | '1': {
19 | pun: 'Id make a pun about a chicken...',
20 | answer: 'But it would be fowl.'
21 | },
22 | '2': {
23 | pun: 'this is a pun about a pickle and a hat',
24 | answer: 'answer'
25 | },
26 | '3': {
27 | pun: 'What kind of cheese can fly?',
28 | answer: 'Curds of Prey.'
29 | },
30 | '4': {
31 | pun: 'What hotel did the cheese stay at?',
32 | answer: 'The Stilton.'
33 | },
34 | '5': {
35 | pun: 'What is the saddest cheese?', answer: 'Blue Cheese.'
36 | },
37 | '6': {
38 | pun: 'What do you call a cheese that isnt yours?',
39 | answer: 'Nacho Cheese.'
40 | },
41 | '7': {
42 | pun: 'What music does cheese listen to?', answer: 'R & Brie.'
43 | },
44 | '8': {
45 | pun: 'Whats always the last piece of cheese left?',
46 | answer: 'Forever Provolone.'
47 | },
48 | '9': {
49 | pun: 'I used to be a hotel clerk',
50 | answer: 'But then I had reservations.'
51 | },
52 | '10': {
53 | pun: 'Im staying at a really trend new hotel',
54 | answer: 'Its the inn thing to do.'
55 | },
56 | '11': {
57 | pun: 'A bird doctor checked into a hotel.',
58 | answer: 'He said, "This is the best place I feather stayed at".'
59 | },
60 | '12': {
61 | pun: 'A bird and a cow go shopping for cheese. The cow, knowing he can produce the milk says to the bird, "this place is robin you blind!".',
62 | answer: 'The bird says, "I like my cheese cheep cheep!'
63 | },
64 | '13': {
65 | pun: 'Why dont bananas snore?',
66 | answer: 'They dont want to wake up the rest of the bunch!'
67 | },
68 | '14': {
69 | pun: 'Why do bananas wear sunscreen?',
70 | answer: 'Because they peel.'
71 | },
72 | '15': {
73 | pun: 'What do you call two banana skins?',
74 | answer: 'A pair of slippers.'
75 | },
76 | '16': {
77 | pun: 'Why are bananas never lonely?',
78 | answer: 'Because they hang around in bunches.'
79 | },
80 | '17': {
81 | pun: 'A chef asked a tomato about to be diced into salsa how it was feeling.',
82 | answer: 'He had a chip on his shoulders and said "its nacho business".'
83 | },
84 | '18': {
85 | pun: 'We saw Kanye the other day at breakfast.',
86 | answer: 'Someone said "Om-a-lette you finish, but I hope that omelette is good!"'
87 | },
88 | '19': {
89 | pun: 'Was on a diet with my sister. She fed me one egg for lunch.',
90 | answer: 'That had me bEGGing for more food!'
91 | },
92 | '20': {
93 | pun: 'How to roosters flirt with chickens?',
94 | answer: 'They wish chickens an egg-stra special day.'
95 | },
96 | '21': {
97 | pun: 'How to tacos handle disputes?',
98 | answer: 'They taco-ver coffee.'
99 | },
100 | '22': {
101 | pun: 'If youre hungry for mexican food, what is the worst thing you could do?',
102 | answer: 'Burrito around the bush about it.'
103 | },
104 | '23': {
105 | pun: 'Our local Mexican restaurant was closed the other day.',
106 | answer: 'They said it was a queso the flu.'
107 | },
108 | '24': {
109 | pun: 'Bunch of avocados decided to run a marathon.',
110 | answer: 'They figure theyve guac what it takes.'
111 | },
112 | '25': {
113 | pun: 'Anyone been exposed to a cheesy mexican pun?',
114 | answer: 'Que, so avocado say, weve all bean there, but lets not taco about it.'
115 | },
116 | '26': {
117 | pun: 'The cow told everyone his grandfather was a knight',
118 | answer: 'And that his name was sir loin. I laughed so hard I had to rib my eyes.'
119 | },
120 | '27': {
121 | pun: 'Why was the cow afraid?',
122 | answer: 'He was a cow-herd.'
123 | },
124 | '28': {
125 | pun: 'What do you call a cow with a twitch?',
126 | answer: 'Beef jerky.'
127 | },
128 | '29': {
129 | pun: 'How do you count cows?',
130 | answer: 'With a cow-culator.'
131 | },
132 | '30': {
133 | pun: 'What do you call a cow with 3 legs?',
134 | answer: 'Lean beef.'
135 | },
136 | '31': {
137 | pun: 'Why did the cow get arrested?',
138 | answer: 'He was using cow-nterfeit money.'
139 | },
140 | '32': {
141 | pun: 'This egg was egg-cellent at cracking me up.',
142 | answer: 'He was making a lot of pun yolks.'
143 | },
144 | '33': {
145 | pun: 'The egg was egg-stremely happy.',
146 | answer: 'But you couldnt really tell from his egg-spression.'
147 | }
148 | }
149 | };
--------------------------------------------------------------------------------
/server/getPuns.js:
--------------------------------------------------------------------------------
1 | const data = require('./data');
2 |
3 | module.exports = function getPuns(kwds) {
4 | if (!kwds || kwds.length === 0) {
5 | return [];
6 | }
7 |
8 | const found = kwds.reduce((found, keyword) => {
9 | const ids = data.keywords[keyword];
10 | if (ids) {
11 | return ids.reduce((found, id) => {
12 | found[id] = data.puns[id];
13 | return found;
14 | }, found);
15 | }
16 | return found;
17 | }, {});
18 |
19 | return Object.keys(found).map(key => found[key]);
20 | };
--------------------------------------------------------------------------------
/server/key.pem:
--------------------------------------------------------------------------------
1 | -----BEGIN RSA PRIVATE KEY-----
2 | MIIEpQIBAAKCAQEAvb5nWT2DzLVGm73L8+33tKJovlAd5lxhMPNZy3eCAz+2dKTa
3 | ap8suvRpA69iWCDUDf1eTQV55y97n3yjeC7bQdrItVzF9MMhb3PZ2wOgpZhk9vRr
4 | IT7goKgSI+7iVcpcNaLXIvJ8qj/1LvSs68UBCaKAHQh+bBtAWBx2waSD9MVpdzh3
5 | sqQtcW1xLuhqzoRl3BhoUtSVifqNbD3Ki+GmZcPKcWNLrpoZ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oYT1AoGADVr7bpLZZsvG3jj8RcqxDTjvag7IoDV8tGP4
22 | u7zYtK0RVCvXqkatZw/zu+EavZ+x4JyxUmjH+ga8kRmvlQVVCS6BrHNh68q9bVcJ
23 | GGAJxa4So+XaScvgNGsEAPgOVPTcD6vf5oSZ3LUF+bvwre3Qgao6LimrguA3qJcc
24 | NGSRDAUCgYEAmhGMyaPXliiP5jidJ0BE4KkaVgthXWil+cn4GErQdWrU3/EkVMOE
25 | QTn1pu9qogpXJru32JS3N7qE68ZS4z0Yd5oHzS3v/Ok5gkP3u7cgLhiGS3cTj2xo
26 | WllASoLkh/XSNxVosXNkiGR2lztjmeHid/I7QPdpj2Wrq/sH51fruTc=
27 | -----END RSA PRIVATE KEY-----
28 |
--------------------------------------------------------------------------------
/server/keytmp.pem:
--------------------------------------------------------------------------------
1 | -----BEGIN RSA PRIVATE KEY-----
2 | Proc-Type: 4,ENCRYPTED
3 | DEK-Info: DES-EDE3-CBC,D7E9E7AEEA30C7B2
4 |
5 | I21MOoX7W1rg16wBrcWMJzMFDr/bdoQm+RwEx/E3FuhElV6hj1U3pM7cI0SqU8fQ
6 | pzaxkK3AGqfaDEI9s6qwPYONcaYI/sAIgP8N77RvC8ADAgs+KCewsmG7M+JCY77F
7 | lN+1yTz71+Eiqlybh97lOPwFcNw8E7OzgdeuwNruYC+yb+xlNDoNXd/o3Htz+FoZ
8 | sKmbJbi3w9Uvmmnk2bRavEijxMWIlH13Re7ppwdKaeTlCOKWIZTroM6KDUHEtG5f
9 | Jf4SOgxUflrkabr1hsNyknRj91qGT7NvEw2gwnrNaJDevMRsLCS7TBKFjyOx8mIf
10 | fSg+MOrgv6mDB+4f07kmSgFiWAxlAujwO9qZeGHZHAwyzt+k2xsQG1XukjYMvidK
11 | GjCp7mGfhWaL7foX8iMkvmcYj/eOD+BBl4mY+FIeJYsGyxHQ4NV9yQiyzm7KO2qz
12 | ZySU3J3pPhJMqWZG00c+TGT5H9RRSvBcjqTmtnw8ItSfYyWdDx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cHFf1ohBXLS2eM1vQVI72NZ7ej+guxM7Osx6D8QVdSP
29 | U09p0R8taeVehIcUXsODcK5+a5Mmmhy1w3LRl6d+sLRZEb1C3hG2gYQHucIXKY0/
30 | -----END RSA PRIVATE KEY-----
31 |
--------------------------------------------------------------------------------
/server/server.csr:
--------------------------------------------------------------------------------
1 | -----BEGIN CERTIFICATE REQUEST-----
2 | MIICwTCCAakCAQAwfDELMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWEx
3 | ETAPBgNVBAcTCFNhbiBKb3NlMRAwDgYDVQQKEwdUaGlzRG90MRMwEQYDVQQDEwpE
4 | ZW1vU2VydmVyMR4wHAYJKoZIhvcNAQkBFg9iZW5AYmVubGVzaC5jb20wggEiMA0G
5 | CSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC+jV1FKOBMfRwLl48zsekTSR59JLna
6 | wOjEg0caV0K1MmT2zAya3gDFAjO85ocYmbOzqqm4GXocitOWWc6ta2TnzrFjKV3J
7 | /xGKNmlhU4QKjov8u8eXYL9AsSjRWpMTyEhYuPwOk5NbYl3g/PIYOmXSqEkWQA9d
8 | //+EkRIsFyQp+vIXFvz/DhuQUl6C1Nog507Whx7eW9Z2SiqALBOfscklEaBl1hrL
9 | H0iCFUmjSosg2v/OS00iAc+Ki4N7RCASblI5NXcX6Vg09FzKu1ahW9iVUgRXRclm
10 | GT9NjgN4KdwJudAQip19peOeLCYbMS1Px9DexMOIG2NqyaKxI0iZG+QbAgMBAAGg
11 | ADANBgkqhkiG9w0BAQUFAAOCAQEAZmfdz9X2/hxvrZA4CssySY3JbxpCYxn5Njlv
12 | GUJmlkpGxDJqKDK+oy4YZdilANDEH7Y7HprMoGwR6mbiJ2lZrchi3Sy72d6L1g41
13 | PR+opQLB9T3C6wNmqqZZnHxvar2bc2WzpMS8jfFq3EBW4MdVOqnwF9d3hXPHze6m
14 | beBtoyNTGdthlr93bXhlnNavh2xT/sPNReBMv7PyH4fH0tk2eLbwPm3mHx28a0V8
15 | 9PA4CwXGnGLil7uPqfVaSGchfMDBb2erDfumCsVuxu8+7n3kgZg5yH6sfmpCFJrN
16 | 7e/PlLu1vsrjyPVI+8io2Z8KKMs66oQTayRmFu22tkURG9bt6A==
17 | -----END CERTIFICATE REQUEST-----
18 |
--------------------------------------------------------------------------------
/server/server.key:
--------------------------------------------------------------------------------
1 | -----BEGIN RSA PRIVATE KEY-----
2 | MIIEpQIBAAKCAQEAvo1dRSjgTH0cC5ePM7HpE0kefSS52sDoxINHGldCtTJk9swM
3 | mt4AxQIzvOaHGJmzs6qpuBl6HIrTllnOrWtk586xYyldyf8RijZpYVOECo6L/LvH
4 | l2C/QLEo0VqTE8hIWLj8DpOTW2Jd4PzyGDpl0qhJFkAPXf//hJESLBckKfryFxb8
5 | /w4bkFJegtTaIOdO1oce3lvWdkoqgCwTn7HJJRGgZdYayx9IghVJo0qLINr/zktN
6 | IgHPiouDe0QgEm5SOTV3F+lYNPRcyrtWoVvYlVIEV0XJZhk/TY4DeCncCbnQEIqd
7 | faXjniwmGzEtT8fQ3sTDiBtjasmisSNImRvkGwIDAQABAoIBAQC8oVwvVmOT1FWq
8 | 9AGCfx/nQ363C2AgOM8zmXENlkwm6xgfZ6cit5mzbJai7OHXbHAD73HLGQ1Uq+kA
9 | 8S4zZhihkG7xZsW9bI6Eb5CqE+6mNK5HJexS4ibxd26csDjgYGedzKFYHKbG0/1y
10 | 93MAoO6jNowDRq7vsrfTF3kRxGa8VkO5niwt86bJCRn84xg9QxdUxj16OC2Ky4Ni
11 | xmPV1BhiO87K9fJr5IwP3YIEvgKfZpy0tErBKwLwY4ptSoLvHU+pj/oEz37Cd+0c
12 | m2X/7awIbhXzcxfYK6/YDrnnUtWr2HPTuI8Q0PgkBJ0ayrYKqQvm31DwKtBb76k9
13 | 5a/zsXoBAoGBAPGyUvUerbAj6PM/t5/eijKcymu9ECy04Yt3myRReBE9KHJgbM8d
14 | t3h4WdoWvthD57+GWr3SaESkkVBXOYibjfStDBcCp/NrIRIpaAkGnxK2NOiHKMBD
15 | HJg6GGjmZsJXddmAfh+0w50fk/hSByHbtyCmYb3hk6g4CXzZIbGIUl/bAoGBAMnU
16 | NXJ7F3aYh0Uy/pYi4JqjyIdgB77k7yeynZFDjke0T/X6J4jBB2+cuNLuhEBMLMR1
17 | ZL9mHdPWoCQkivInDlVH+fI5PKT5VxrhsLvfsuRv0Aq+ksVhCRcgmOeeWtPfkqW/
18 | hoGRQtZ81uZdoP1GIzFda0cf2L+LNCvJxfeABuDBAoGAc3KCPaNRw3jjpI0i4LIj
19 | wNkztxKvzyr3MO8Io+hmOZXE5B063BONt3WFNa73qcWFxO4gGduPAnq5Dm8bhC0J
20 | OX4O8E7MenEJcutkTitjgESYMRmeVXe5CN13G2QyYVH1cNb3Z52ocjzLKSnFTl7s
21 | siPHPDOrnAZoQcJVXb+H2VECgYEAuh3h558RJQFFBJAg6yxgeNn+KrBolCWjULVK
22 | zlFA3GivsAIuANMYW1lnqsPe2zgjtEsZS9MMQHRUGuBD7UgM1KHaIP+dJ/jy1Uw4
23 | YRfJbRSbAb15tWBlNJmPx09lLKqoHga/L65Xt1lKBwdiVQ0fmP8v1VfN1dy1kIex
24 | 8ilyrkECgYEApONLED2H5kfE1rpB+v1GQ0hV9u0at8vrylJb5hS0v3RIzTgiG6OT
25 | vfzGNZB+Vqexg0PdIXEajcjYd9IZCJdNQkYLVJ2sW7SOpMDi/AS9UeNzjFG4OIf7
26 | cul6wf3M03JwLeQQCeYryd5OzZ+GkL4IwPPNeGbATj5DidEy2VqVmF4=
27 | -----END RSA PRIVATE KEY-----
28 |
--------------------------------------------------------------------------------
/server/suggestKeywords.js:
--------------------------------------------------------------------------------
1 | const data = require('./data');
2 |
3 | module.exports = function suggestKeywords(partial) {
4 | if (!partial) {
5 | return [];
6 | }
7 |
8 | return Object.keys(data.keywords)
9 | .filter(keyword => keyword.indexOf(partial) === 0)
10 | };
--------------------------------------------------------------------------------
/src/app/app.component.css:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ladyleet/rxjs-test/cb0c5263b91d4da97f1fd56f4f31fa6ba627ed2d/src/app/app.component.css
--------------------------------------------------------------------------------
/src/app/app.component.html:
--------------------------------------------------------------------------------
1 |