File tree 17 files changed +140
-0
lines changed
17 files changed +140
-0
lines changed Original file line number Diff line number Diff line change
1
+ node_modules
Original file line number Diff line number Diff line change
1
+ export default new class Helix {
2
+
3
+ start ( ) {
4
+ console . log ( 'starting' ) ;
5
+ }
6
+
7
+ }
Original file line number Diff line number Diff line change
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
+ }
Original file line number Diff line number Diff line change
1
+ node_modules
Original file line number Diff line number Diff line change
1
+ //import exa from 'exa'; // prod
2
+ import exa from '../../lib/index.js' ;
3
+
4
+ exa . start ( ) ;
Original file line number Diff line number Diff line change
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
+ } ;
Original file line number Diff line number Diff line change
1
+ console . log ( 'running console command --test' )
Original file line number Diff line number Diff line change
1
+ export default {
2
+
3
+ routes : {
4
+ 'get /api/two/test' : test ,
5
+ } ,
6
+
7
+ test ( req , res ) {
8
+
9
+ }
10
+
11
+ } ;
Original file line number Diff line number Diff line change
1
+ export default {
2
+
3
+ routes : {
4
+ 'get /one/test' : test ,
5
+ } ,
6
+
7
+ test ( req , res ) {
8
+
9
+ }
10
+
11
+ } ;
Original file line number Diff line number Diff line change
1
+ export default {
2
+
3
+ to_s ( num ) {
4
+ console . log ( str . num . to_string ( ) ) ;
5
+ }
6
+
7
+ } ;
Original file line number Diff line number Diff line change
1
+ export default {
2
+
3
+ now ( ) {
4
+ console . log ( + new Date ( ) ) ;
5
+ }
6
+
7
+ } ;
Original file line number Diff line number Diff line change
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
+ } ;
Original file line number Diff line number Diff line change
1
+ {
2
+ "type" : " module" ,
3
+ "dependencies" : {
4
+ "exa" : " 0.0.1"
5
+ }
6
+ }
Original file line number Diff line number Diff line change
1
+ .test {
2
+ font-size : 14px ;
3
+ }
Original file line number Diff line number Diff line change
1
+ console . log ( 'loaded' ) ;
You can’t perform that action at this time.
0 commit comments