Node emulator

Tips on how to use the node emulator

Advertisement :)

  • babelfish - developer friendly i18n with plurals support and easy syntax.

You will like those projects!

how to use the node interpreter

read a dir 1.- run node

node

2.- declare the file manager & join tool to join strings

const fs = require("fs")
const {join} = require("path")

3.- read directories

fs.readdirSync(join(process.cwd(),"/content/blogs"))

4.- read a file

fs.readFileSync(join(process.cwd(),"/content/blogs/markdown-full-example.md"),"utf8")