AcyOrt can be used as a module in plugin or script test. default config value can be fetched with acyorg-config module.

example

const Acyort = require('acyort')
const { defaults } = require('acyort-config')

const config = defaults

config.base = __dirname
config.cache =  true
config.scripts = ['archives.js']
config.scripts_dir = '/'

const acyort = new Acyort(config)

;(async () => {
  await acyort.build()
  // After generate the static files 

  await acyort.start()
  // After start local server
})()

build

acyort.build()

Get the posts data and generate the static files.

start

acyort.start([port])

Run build task and create a liveReload web server

Contents