Demo entry 6633544

js

   

Submitted by anonymous on Aug 03, 2017 at 09:25
Language: JavaScript. Code size: 777 Bytes.

"use strict";
const app = require('express')(),
    http = require('http'),
    https = require('https'),
    server = require('socket.io'),
    path = require('path'),
    fs = require('fs-extra'),
    config = require(path.join(__dirname, 'config')),
    routes = require(path.join(__dirname, 'routes')),
    socket = require(path.join(__dirname, 'socket')),
    logger = config.logger;

process.umask(0);
fs.ensureDir(path.join(__dirname, 'logs'), {mode: Number.parseInt('0777', 8)}, function (err) {
    if (err) {
        console.log('create logs folder err:%s ', err);
    }
});
fs.ensureDir(config.getTempFolder(), {mode: Number.parseInt('0777', 8)}, function (err) {
    if (err) {
        console.log('create temp folder err:%s ', err);
    }
});

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).