Let's say you want to host domains first.com and second.com.
Create folders for their files:
We will compare ASP.NET and Node.js for backend programming.
Source codes from examples.
This document was published on 21.09.2015 for a freelance employer. Some changes since then (14.02.2016):
async/await. yield and await are used almost in the same way, so I see no point to rewrite the examples.| nodejs | |
| curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash - | |
| sudo apt-get install -y nodejs | |
| nginx | |
| sudo apt-get update | |
| sudo apt-get install nginx | |
| check | |
| systemctl status nginx |
| iisnode-full-v0.2.21-x64 (1) | |
| node-v10.11.0-x64 | |
| rewrite_amd64_en-US (1) | |
| var express = require('express'); | |
| var fs = require('fs'); | |
| var app = express(); |
| import { Component } from '@angular/core'; | |
| import { Meta } from '@angular/platform-browser'; | |
| @Component({ | |
| selector: 'app-home', | |
| templateUrl: './home.component.html', | |
| styleUrls: ['./home.component.css'] | |
| }) | |
| export class HomeComponent { | |
| constructor(private meta: Meta) { |
| const path = require('path'); | |
| const webpack = require('webpack'); | |
| const apiUrl = 'http://localhost:3000'; | |
| module.exports = { | |
| outputDir: './dist/public', | |
| chainWebpack: config => { | |
| config.plugin('html').tap(([options]) => [ | |
| Object.assign(options, { |
| const path = require("path"); | |
| const fs = require("fs"); | |
| const _ = require("lodash"); | |
| const config = require("./crwl-config.json"); | |
| const Url = require("url"); | |
| const moment = require('moment'); | |
| module.exports.generate = urls => { | |
| var uris = urls.map(url => { | |
| return `<url> |
| http://localhost:3000/upload | |
| node: | |
| var express = require('express'); | |
| var app = express(); | |
| var path = require('path'); |
| import { Component, OnInit, Input, ViewEncapsulation, ChangeDetectorRef, Output, EventEmitter } from '@angular/core'; | |
| import { HttpClient } from '@angular/common/http'; | |
| @Component({ | |
| selector: 'app-user', | |
| encapsulation: ViewEncapsulation.Native, | |
| template: ` | |
| {{user|json}} | |
| `, | |