Skip to content

Commit 93d7ebf

Browse files
committed
initial
0 parents  commit 93d7ebf

File tree

17 files changed

+140
-0
lines changed

17 files changed

+140
-0
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules

lib/index.js

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
export default new class Helix {
2+
3+
start() {
4+
console.log('starting');
5+
}
6+
7+
}

package.json

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"name": "exa",
3+
"type": "module",
4+
"author": "Brian Seymour <@realtux>",
5+
"version": "0.0.1",
6+
"description": "modern pure mvc node.js framework based on express",
7+
"license": "MIT",
8+
"homepage": "https://github.com/realtux/exa",
9+
"main": "./lib/index.js",
10+
"repository": {
11+
"type": "git",
12+
"url": "git://github.com/realtux/exa"
13+
},
14+
"dependencies": {
15+
"express": "4.18.2",
16+
"luxon": "3.1.1",
17+
"nocamel": "1.0.2",
18+
"nodemon": "2.0.4",
19+
"sequelize": "6.19.0",
20+
"twig": "1.15.4"
21+
}
22+
}

var/seed_root/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules

var/seed_root/app.js

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
//import exa from 'exa'; // prod
2+
import exa from '../../lib/index.js';
3+
4+
exa.start();

var/seed_root/config/master.js

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
export default {
2+
3+
environment: {
4+
// this will enable or disable certain development features
5+
development: true,
6+
},
7+
8+
server: {
9+
/**
10+
* base http server core information
11+
*/
12+
host: '0.0.0.0',
13+
port: 8118,
14+
},
15+
16+
formatting: {
17+
/**
18+
* whether or not to use opinionated snake case aliases
19+
* this will include:
20+
* - nocamel npm module
21+
* - sequelize symbol and method aliases
22+
*/
23+
snake_aliases: true,
24+
}
25+
26+
};

var/seed_root/console/test.js

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
console.log('running console command --test')

var/seed_root/controllers/api/two.js

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
export default {
2+
3+
routes: {
4+
'get /api/two/test': test,
5+
},
6+
7+
test(req, res) {
8+
9+
}
10+
11+
};

var/seed_root/controllers/one.js

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
export default {
2+
3+
routes: {
4+
'get /one/test': test,
5+
},
6+
7+
test(req, res) {
8+
9+
}
10+
11+
};
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
export default {
2+
3+
to_s(num) {
4+
console.log(str.num.to_string());
5+
}
6+
7+
};

var/seed_root/library/util.js

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
export default {
2+
3+
now() {
4+
console.log(+new Date());
5+
}
6+
7+
};

var/seed_root/models/posts.js

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
const Sequelize = require('sequelize');
2+
3+
export default (sequelize, DataTypes) => {
4+
class posts extends Sequelize.Model {
5+
6+
}
7+
8+
posts.init(
9+
{
10+
post_id: {
11+
type: DataTypes.INTEGER,
12+
primaryKey: true,
13+
autoIncrement: true
14+
},
15+
body: DataTypes.TEXT,
16+
created_at: DataTypes.DATE,
17+
},
18+
{
19+
sequelize,
20+
modelName: 'posts',
21+
freezeTableName: true,
22+
23+
hooks: {
24+
async beforeCreate(instance) {
25+
instance.created_at = util.now();
26+
}
27+
}
28+
}
29+
);
30+
31+
return posts;
32+
};

var/seed_root/package.json

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"type": "module",
3+
"dependencies": {
4+
"exa": "0.0.1"
5+
}
6+
}

var/seed_root/public/css/test.css

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.test {
2+
font-size: 14px;
3+
}

var/seed_root/public/img/dog.jpg

28.3 KB
Loading

var/seed_root/public/js/test.js

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
console.log('loaded');

var/seed_root/views/layout.twig

Whitespace-only changes.

0 commit comments

Comments
 (0)