Skip to content

Commit

Permalink
version bump, update template examples, clarify config docs
Browse files Browse the repository at this point in the history
  • Loading branch information
realtux committed Jun 26, 2024
1 parent e42ad99 commit 5fd3394
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 8 deletions.
2 changes: 1 addition & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export default new class {


console.log();
console.log(`${chalk.yellow('exa.js')} by tux - v0.0.5`);
console.log(`${chalk.yellow('exa.js')} by tux - v0.0.9`);
console.log('-----------------------------');
console.log(`${chalk.green(DateTime.now().toISO())}`);
console.log('-----------------------------');
Expand Down
2 changes: 1 addition & 1 deletion license
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2022-2024 Brian Seymour
Copyright (c) 2024-Present Brian Seymour

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@exajs/core",
"type": "module",
"author": "Brian Seymour <@realtux>",
"version": "0.0.8",
"version": "0.0.9",
"description": "modern opinionated node.js framework",
"license": "MIT",
"homepage": "https://github.com/realtux/exa",
Expand Down
2 changes: 1 addition & 1 deletion var/template/config/master.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export default {

/**
* user defined custom configuration
* add anything you'd like
* add anything you'd like to be avaiable at exa.config.*
*/

};
3 changes: 1 addition & 2 deletions var/template/docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
. .env

# switch to current directory
scriptdir=$(dirname "$0")
cd $scriptdir
cd $(dirname "$0")

case $* in
console* )
Expand Down
6 changes: 5 additions & 1 deletion var/template/http/api/hello.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
import sample from '#app/models/sample.js';

export default new class {

routes = {
'get /api/hello/world': 'world',
}

world(req, res) {
async world(req, res) {
sample.model_method();

return res
.status(200)
.send({
Expand Down
2 changes: 1 addition & 1 deletion var/template/http/two.js → var/template/http/home.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default new class {
'get /home': 'home',
}

home(req, res) {
async home(req, res) {
return res
.status(200)
.render('sample.html', {
Expand Down
4 changes: 4 additions & 0 deletions var/template/models/sample.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ class sample extends Model {
}
}

static model_method() {
console.log('calling sample.model_method()');
}

}

export default sample;

0 comments on commit 5fd3394

Please sign in to comment.