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
    
  
  
    
  | sudo su | |
| dd if=/dev/zero of=/swapfile bs=1M count=17408 | |
| mkswap /swapfile | |
| chmod 600 /swapfile | |
| swapon /swapfile | |
| # below is only for swapfile | |
| /swapfile none swap defaults 0 0 | |
| # check for errors | 
  
    
      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 { app } = require("./init/modules"); | |
| const express = require('express'); | |
| const path = require('path'); | |
| const bodyParser = require('body-parser') | |
| const app = express(); | |
| app.set('views', path.join(__dirname, './views')) | |
| app.set('view engine', 'hbs'); | 
  
    
      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
    
  
  
    
  | "Print to console": { | |
| "scope": "javascript,typescript", | |
| "prefix": "expapp", | |
| "body": [ | |
| "const express = require('express')", | |
| "const bodyParser = require('body-parser')", | |
| "const cors = require('cors')", | |
| "const path = require('path');", | |
| "", | |
| "const app = express()", | 
  
    
      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
    
  
  
    
  | // Pseudocode | |
| const cipher = encrypt(5) | |
| typeof cipher // 'bigint' | 
  
    
      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
    
  
  
    
  | package main | |
| import ( | |
| "encoding/json" | |
| "fmt" | |
| "io/ioutil" | |
| "github.com/kataras/iris" | |
| "github.com/kataras/iris/middleware/logger" | 
  
    
      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 express = require('express') | |
| const fs = require('fs') | |
| const app = express() | |
| const router = express.Router() | |
| app.get('/',(req,res) => { | |
| d = fs.readFileSync('./data.json', 'utf8'); | |
| data = JSON.parse(d); | 
  
    
      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
    
  
  
    
  | /*! Bootstrap-off-canvas-push - v1.0.2 | |
| * Copyright (c) 2015 Steffen Ermel; Licensed MIT * | |
| */ | |
| html,body{height:100%;min-height:100%}body.active{overflow-x:hidden;overflow-y:hidden}.overlay{background-color:transparent;position:fixed;top:0px;bottom:0px;left:0px;width:25px;z-index:100}.overlay.active{background-color:rgba(0,0,0,0.5);-webkit-transition:background-color 0.35s;transition:background-color 0.35s;top:0px;bottom:0px;left:0px;right:0px;width:100%}@media screen and (max-width: 768px){.row-offcanvas{position:relative;-webkit-transition:all .25s ease-out;transition:all .25s ease-out}.row-offcanvas-left{left:0}.row-offcanvas-left .sidebar-offcanvas{left:-50%}.row-offcanvas-left.active{left:50%}.sidebar-offcanvas{position:absolute;top:0;width:50%}.sidebar-nav .navbar .navbar-collapse{padding:0;max-height:none}.sidebar-nav .navbar ul{float:none}.sidebar-nav .navbar ul:not{display:block}.sidebar-nav .navbar li{float:none;display:block}.sidebar-nav .navbar li a{padding-top:12px;padding-bottom:12px}}.navbar-c | 
  
    
      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
    
  
  
    
  | body { | |
| font-family: 'Roboto', sans-serif; | |
| font-size : 14px; | |
| line-height : 21px; | |
| color : #444444; | |
| font-weight : 300; | |
| background: #f2f1f1; | |
| } | 
  
    
      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
    
  
  
    
  | router.get("/:xxxx", async (req, res) => { | |
| let postPath = `/${xxxx}/${xxxx}/${title}`; | |
| let postByURL = `.....`; | |
| await axios | |
| .get(postByURL) | |
| .then(response => { | |
| let { | |
| ...... | 
  
    
      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 express = require("express"); | |
| const bodyParser = require("body-parser"); | |
| const cors = require("cors"); | |
| const path = require("path"); | |
| const port = 3004; | |
| const app = express(); | |
| const postListRoute = require("./controller/postList"); | |
| const homeController = require("./controller/singlePost"); |