Replies: 1 comment
-
|
Hi, Thank you so much for your support and recognition of Sutando! I'm delighted to hear that you found Sutando while exploring JavaScript and that it provides you with a similar comfort to Laravel. Your feedback is very important to us, and here are my responses to the points you mentioned:
try {
const connection = sutando.connection();
await connection.raw('SELECT 1+1 AS result');
console.log('Connection has been established successfully.');
} catch (error) {
console.error('Unable to connect to the database:', error);
}This ensures that your web server will only start if the connection to the database is successful. Subsequent versions can add a method to connection to help users perform this query.
Thank you very much for your valuable suggestions! If you have more ideas or questions, feel free to discuss them with me anytime. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello 👋 👋 👋 @kiddyuchina ,
First of all, I would like to thank you for the incredible work you've done on Sutando. I enjoyed working with the Laravel framework for a long time, and now that I'm exploring JavaScript, I'm still looking for the same comfort I had with Laravel. That's how I started looking for an ORM similar to Eloquent, and that led me to discover Sutando. I believe this project should be more widely known and given greater visibility.
There are a few points I'd like to discuss with you. I'll list them here first:
How can we verify that the
databaseconnection is established? I'd like my web server to start only if the connection to thedatabaseis successful.In the rest-express example, for
migrationsandseeders, we need to manually add thedatabaseconnection. Wouldn't it be possible to have a configuration file that returns adatabaseconnection instance? Then, inmigrationsorseeders, we could call this file to retrieve the instance and check the connection before proceeding with creating the schema or executing theseeders.In a project using TypeScript with
type: "module"in thepackage.json, when running thesutando initcommand, asutando.config.jsfile is generated withmodule.exportsinside. However, as far as I know,module.exportsis not supported with the module type, and the file is not a.tsfile either.I'm open to discussion and look forward to hearing from you.
Beta Was this translation helpful? Give feedback.
All reactions