@vulkano/core 1.0.1 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -16,106 +16,65 @@ Thank you to all [our backers](https://opencollective.com/vulkanojs#backer)!
16
16
  [![vulkano backers](https://opencollective.com/vulkanojs/tiers/backer.svg?avatarHeight=50)](https://opencollective.com/vulkanojs#backers)
17
17
 
18
18
 
19
- ## Stack
19
+ ## Buy me a coffe
20
20
 
21
- ### API
22
-
23
- - Node.js
24
- - [Express](http://expressjs.com)
25
- - [Mongoose](http://mongoosejs.com/)
26
- - [Nunjucks](http://mozilla.github.io/nunjucks/) (Template Engine)
27
- - [Nodemon](http://nodemon.io/) (Reload automatically for dev mode)
28
- - [PM2](http://pm2.keymetrics.io/) (Deployment)
29
- - [Gulp](https://gulpjs.com/) (Automate and enhance your workflow)
30
- - [BrowserSync](https://www.browsersync.io/) (Time-saving synchronised browser testing)
31
- - [WebPack](https://webpack.js.org/) (Bundle your scripts)
21
+ [Buy me a coffe](https://buymeacoffee.com/argordmel) 🙏
32
22
 
33
23
  ## Install
34
24
 
35
25
  ### System
36
26
 
37
27
  - Unix
38
- - Node.js v12+
28
+ - Node.js v20+
39
29
 
40
30
  ### Packages
41
31
 
42
32
  ```bash
43
- $ yarn install
33
+ $ npm install @vulkano/core
44
34
  ```
45
35
 
46
- ## Workflow
47
-
48
- | Command | Description |
49
- | :------------------------------ | :---------------------------------------- |
50
- | `npm run dev` | Run development server and watch changes |
51
- | `npm run start` | Start development server |
52
- | `npm run gulp` | Start browsersync & sass |
53
- | `npm run webpack` | Start webpack |
54
- | `npm run build` | Task to buils assets in production mode |
55
- | `npm run deploy:heroku` | Update Heroku app |
56
- | `npm run deploy:server` | Deploy app into server |
57
-
58
-
59
- ## Structure
36
+ ## Your App Structure
60
37
 
61
- - `app/`
62
- - `client/`
63
- - `cms/`
64
- - `core/`
65
38
  - `public/` - HTTP Public folder
66
- - `Procfile` - Heroku entry point
67
- - `README.md`
39
+ - `vulkano/` - Vulkano App (config, controllers, models, views)
68
40
  - `app.js` - Server entry point
69
- - `nodemon.json` - Nodemon entry point
70
-
71
-
72
- ## Your App Folder
73
-
74
- ### Config
75
- You can create any config enviroments as needed. By default, vulcano runs with NODE_ENV=development, in development mode. In productions servers, you should change NODE_ENV to _production_.
76
-
77
- #### connections.js
78
-
79
- #### policies.js
80
-
81
- #### routes.js
82
-
83
- #### server.js
84
-
85
- ### Controllers
86
-
87
- ### Helpers
88
41
 
89
- #### Filters
42
+ ## Your Server entry point
90
43
 
91
- ### Models
92
-
93
- ### Responses
94
-
95
- #### vsr.js
96
-
97
- ### Services
98
-
99
- #### ActiveRecord.js
100
-
101
- #### AppController.js
102
-
103
- #### Filter.js
104
-
105
- #### Jwt.js (Json Web Token)
106
-
107
- #### Paginate.js
108
-
109
- #### Upload.js
110
-
111
- #### VSError.js
44
+ ```bash
45
+ /**
46
+ * app.js
47
+ *
48
+ * To start the server, run: ⁠ node app.js ⁠.
49
+ *
50
+ * For example:
51
+ * => ⁠ npm run start ⁠
52
+ * => ⁠ node app.js ⁠
53
+ */
54
+
55
+ const vulkano = require('@vulkano/core');
56
+
57
+ vulkano(); ⁠
58
+ ```
112
59
 
113
- ### Views.js
114
60
 
115
- #### _shared
61
+ ## Your Vulkano App Folder
116
62
 
117
- ##### Errors
63
+ - `vulkano/` - Vulkano App
64
+ - `config` - Your config files
65
+ - `env` - Folder for custom environment settings
66
+ - `express` - Folder to customize the server (cookies, jwt, helmet, cors and settings)
67
+ - `locales` - i18n folder
68
+ - `views` - Folder to customize filters and helpers to Nunjukcs
69
+ - `controllers` - Your controllers
70
+ - `models` - Your models
71
+ - `services` - Your services or libs
118
72
 
119
- ##### Partials
73
+ ## Your Vulkano Public Folder
120
74
 
121
- ##### Templates
75
+ - `public/` - Public Path
76
+ - `css` - Styles
77
+ - `fonts` - Fonts
78
+ - `img` - Images
79
+ - `js` - Javascript
80
+ - `files` - Files uploaded
package/app.js CHANGED
@@ -64,7 +64,7 @@ if (!fs.existsSync(PUBLIC_PATH)) {
64
64
  }
65
65
 
66
66
  // Read Dontenv config
67
- dotenv.config();
67
+ dotenv.config({ path: `${ABS_PATH}/.env` });
68
68
 
69
69
  // Include all api config
70
70
  const config = require('include-all')({
@@ -64,11 +64,16 @@ module.exports = {
64
64
  port: expressSettingsPort
65
65
  } = expressGeneralSettings || {};
66
66
 
67
+ const {
68
+ NODE_PORT: ENV_NODE_PORT,
69
+ PORT: ENV_PORT
70
+ } = process.env || {};
71
+
67
72
  // Express default configuration
68
73
  const expressDefaultConfig = {
69
- timeout: 120000, // 2 min
74
+ timeout: 120000,
70
75
  poweredBy: false,
71
- port: process.env.PORT || expressUserPort || expressSettingsPort || 8000,
76
+ port: ENV_NODE_PORT || ENV_PORT || expressUserPort || expressSettingsPort || 8000,
72
77
  cors: {},
73
78
  cookies: {},
74
79
  jwt: {},
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vulkano/core",
3
- "version": "1.0.1",
3
+ "version": "1.1.0",
4
4
  "description": "A MVC framework using Express 4",
5
5
  "license": "MIT",
6
6
  "author": "Vulkano Team",