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 React from "react"; | |
| import { httpGet } from "./service"; | |
| import "./App.css"; | |
| import logo from "./logo.svg"; | |
| class App extends React.Component { | |
| constructor({}) { | |
| super({}, null); | |
| httpGet("http://abc.com/api/location/country").subscribe({ |
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
| { | |
| "extends": ["tslint:recommended", "tslint-react", "tslint-config-prettier"], | |
| "linterOptions": { | |
| "exclude": [ | |
| "config/**/*.js", | |
| "node_modules/**/*.ts" | |
| ] | |
| }, | |
| "rules": { | |
| "arrow-return-shorthand": 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
| import { HttpClient, HttpHeaders, HttpParams } from "@angular/common/http"; | |
| import { Injectable } from "@angular/core"; | |
| import { TokenManager } from "@app/shared/services/token-manager.service"; | |
| @Injectable() | |
| export class ApiHandler { | |
| constructor(private http: HttpClient) {} | |
| apiGet(url, params?, extras?: Extras) { | |
| let options = this.renderHeaders(extras); |
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
| onmessage = function(e) { | |
| console.log('Message received from main script'); | |
| var workerResult = 'Result: ' + (e.data[0] * e.data[1]); | |
| console.log('Posting message back to main script'); | |
| postMessage(workerResult); | |
| } |
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"; | |
| @Component({ | |
| selector: "app-dashboard", | |
| templateUrl: "dashboard.component.html" | |
| }) | |
| export class DashboardComponent implements OnInit { | |
| constructor() {} | |
| ngOnInit() { |
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
| server { | |
| listen 80; | |
| server_name www.js-server.com js-server.com; | |
| root /home/jyotendra/files/projects/express-sequelize/; | |
| location ~ | |
| ^/(assets/|public/|images/|img/|javascript/|js/|css/|stylesheets/|media/|static){ |
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
| <!doctype html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>NgApp</title> | |
| <!-- Need to change this base href to proper folder hierarchy --> | |
| <base href="/ng/"> | |
| <meta name="viewport" content="width=device-width,initial-scale=1"> | |
| <link rel="icon" type="image/x-icon" href="favicon.ico"> |
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 fs from 'fs' | |
| import * as path from 'path' | |
| import * as Sequelize from 'sequelize' | |
| // configuration to connect to db are getted | |
| const config = require('../config/config.json') | |
| // Import model specification from its own definition file. | |
| import { LanguageInstance, LanguageAttributes } from './language' | |
| import { AppUserInstance, AppUserAttributes } from './appuser' |
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 Sequelize from 'sequelize' | |
| export interface AppUserAttributes { | |
| id?: string | |
| active?: boolean, | |
| avatar?: string, | |
| email?: string, | |
| firstName?: string, |
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
| namespace Data.Model | |
| { | |
| class Image | |
| { | |
| public string Title { get; set; } | |
| public bool IsBlurred { get; set; } = false; | |
| } | |
| } |