Closed FrancescoSaverioZuppichini closed 6 years ago
Hello Francesco, glad you like the module!
This idea is very good, I will look into implementing it. So, for example, when you create beaConfig.json, with the paths such as
{ controllers: "./folder1/folder2/controllers" }
and run the init function, the CLI would create folder1/folder2/controllers.
Is that what you are aiming at, or am I missing something?
Assuming I want to create n
controllers and m
models, in order to do so I need to call the command like n + m
times. Maybe, I could create a .json
config files, where I defined each controller and model and then call the command line in order to automatically create all the files.
For example:
{
"controllers": {
"user": {
"getUsers": "GET"
...
},
"auth": {
"getToken": "GET"
...
},
"post": {
"getPosts": "GET"
...
}
},
"models": {
"User": {name: String},
"Post": {title: String}
}
}
In order to create three controllers,user
, auth
, and posts
, and two models, User
and Post
Oh, I understand now. Yes, I think this is a good suggestion, I will start working on it!
Thank you for your idea, Francesco, I will notify you when I update the module, with this functionality.
It should be easy, in the end, you just need to parse the .json file and call the functions that you have already implemented. Unfortunately, I am pretty busy studying with my finals so I won’t able to help but I promise you I will also write a short article on medium as soon as this new functionality is implemented since I was looking for a tool like this but I could not find anything. I was also thinking to implement it on my own but you beat me ;)
Please send me the article when you write it, I would love to read it. Also is it ok if I add to the changelog, that you suggested this improvement?
Yes of course. Thank you
Francesco, I implemented the feature and added that you suggested it to the Changelog. Again thank you for your suggestion. I am now closing this issue. :)
Hello there! Amazing work!
Would be nice to add a way to pass a .json file with a list of configurations such as:
In order to even quicker define the application structure?
Cheers,
Francesco Saverio