diff --git a/app.js b/app.js index dc4b8dc..9facda8 100755 --- a/app.js +++ b/app.js @@ -46,26 +46,32 @@ function initialise() { const users = require("./users.js"); } catch (error) { + console.log("Creating users file") fs.writeFileSync(`${__dirname}/users.js`, `export const users = []`) } try { const posts = require("./posts.js"); } catch (error) { + console.log("Creating posts file") fs.writeFileSync(`${__dirname}/posts.js`, `export const posts = []`) } try { const users = require("./comments.js"); } catch (error) { + console.log("Creating comments file") fs.writeFileSync(`${__dirname}/comments.js`, `export const comments = []\nexport const counter = 0`) } try { const users = require("./config.js"); } catch (error) { + console.log("Copying the example config to config.js") + console.log("!!! PLEASE MODIFY config.js TO YOUR NEEDS !!!") fs.copyFile('example-config.js', 'config.js') } + process.exit() } function get_userID(username) { diff --git a/hitcount.txt b/hitcount.txt index eaea6f5..9ce0f49 100644 --- a/hitcount.txt +++ b/hitcount.txt @@ -1 +1 @@ -240 \ No newline at end of file +241 \ No newline at end of file