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
| export async function readFile(fileName: string) { | |
| async function next(lines = 1): Promise<any> { | |
| } | |
| return { next }; | |
| } |
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
| import {join} from 'path'; | |
| import {expect} from 'chai'; | |
| import {readFile} from './read-file'; | |
| describe('Read File Function', () => { | |
| let file; | |
| beforeEach(async () => { | |
| file = await readFile(join(__dirname, '..', 'dumps', 'dump1.sql')); |
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
| import * as denodeify from 'denodeify'; | |
| import * as fs from 'fs'; | |
| import {createStore, Store} from 'redux'; | |
| import { defer } from './defer'; | |
| import {Map, List, Range} from 'immutable'; | |
| const BUFFER_SIZE = 4 * 1024; | |
| const END_OF_LINE = '\n'; | |
| enum ReaderTypes { |
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
| import { NgModule } from '@angular/core'; | |
| import { ServerModule } from '@angular/platform-server'; | |
| import { AppModule } from './app.module'; | |
| import { AppComponent } from './app.component'; | |
| @NgModule({ | |
| imports: [ | |
| ServerModule, | |
| AppModule | |
| ], |
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
| import { BrowserModule } from '@angular/platform-browser'; | |
| import { NgModule } from '@angular/core'; | |
| import { FormsModule } from '@angular/forms'; | |
| import { HttpModule } from '@angular/http'; | |
| import { AppComponent } from './app.component'; | |
| @NgModule({ | |
| declarations: [ | |
| AppComponent |
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
| { | |
| "extends": "../tsconfig.json", | |
| "compilerOptions": { | |
| "outDir": "../out-tsc/app", | |
| "module": "es2015", | |
| "baseUrl": "", | |
| "types": [] | |
| }, | |
| "exclude": [ | |
| "server.ts", |
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
| import 'reflect-metadata'; | |
| import 'zone.js/dist/zone-node'; | |
| import { platformServer, renderModuleFactory } from '@angular/platform-server' | |
| import { enableProdMode } from '@angular/core' | |
| import { AppServerModuleNgFactory } from '../dist/ngfactory/src/app/app.server.module.ngfactory' | |
| import * as express from 'express'; | |
| import { readFileSync } from 'fs'; | |
| import { join } from 'path'; | |
| const PORT = 4000; |
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
Show hidden characters
| { | |
| "compileOnSave": false, | |
| "compilerOptions": { | |
| "outDir": "./dist/out-tsc", | |
| "baseUrl": "src", | |
| "sourceMap": true, | |
| "declaration": false, | |
| "moduleResolution": "node", | |
| "emitDecoratorMetadata": true, | |
| "experimentalDecorators": true, |
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
| { | |
| "name": "cli-universal-demo", | |
| "version": "0.0.0", | |
| "license": "MIT", | |
| "scripts": { | |
| "prestart": "ng build --prod && ngc", | |
| "start": "ts-node src/server.ts" | |
| }, | |
| "private": true, | |
| "dependencies": { |
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
| import { Component, OnInit } from '@angular/core'; | |
| import { Router, NavigationEnd } from '@angular/router'; | |
| import { Meta, Title } from '@angular/platform-browser'; | |
| @Component({ | |
| selector: 'app-root', | |
| templateUrl: './app.component.html', | |
| styleUrls: ['./app.component.scss'] | |
| }) | |
| export class AppComponent implements OnInit { |
OlderNewer