-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathindex.js
More file actions
17 lines (14 loc) · 740 Bytes
/
index.js
File metadata and controls
17 lines (14 loc) · 740 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// Create cache directories
var fs = require('fs');
var path = require('path');
var cache = path.resolve(process.env.CACHE || 'cache'),
key = path.resolve(process.env.CACHE || 'cache', 'key'),
devices = path.resolve(process.env.CACHE || 'cache', 'devices'),
messages = path.resolve(process.env.CACHE || 'cache', 'messages'),
provisions = path.resolve(process.env.CACHE || 'cache', 'provisions');
if (!fs.existsSync(cache)) fs.mkdirSync(cache);
if (!fs.existsSync(key)) fs.mkdirSync(key);
if (!fs.existsSync(devices)) fs.mkdirSync(devices);
if (!fs.existsSync(messages)) fs.mkdirSync(messages);
if (!fs.existsSync(provisions)) fs.mkdirSync(provisions);
module.exports = require('./app');