Skip to content

arthurbergmz/organiser-static

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Serve static files

Organiser example

Serving static files at localhost:3000 (default) with Organiser.

@GET
async home () {
  return Response.static(path.join(__dirname, '../static/index.html')).build()
}

Disclaimer: misbehavior while serving static files with Organiser v1.0.0. You have to use Response as below:

@GET
async home () {
  return (await Response.static('../filepath.json')).build()
}

how to run

  1. install dependencies
$ npm install
  1. compile scripts
$ npm run build
  1. start server
$ npm start

how to develop

  1. install dependencies
$ npm install
  1. start server (with hot reload)
$ npm run dev