Skip to content

Instantly share code, notes, and snippets.

@kartiknair
Created March 10, 2020 07:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kartiknair/c96e8551275f534ece69621186177907 to your computer and use it in GitHub Desktop.
Save kartiknair/c96e8551275f534ece69621186177907 to your computer and use it in GitHub Desktop.
const config = require("./config");
const createPost = require("./posts.js");
const posts = fs
.readdirSync(config.dev.postsdir)
.map(post => post.slice(0, -3))
.map(post => postMethods.createPost(post));
console.log(posts);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment