Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Express won't start. #20

Closed
andrewtite-haptiq opened this issue Mar 20, 2023 · 11 comments
Closed

Express won't start. #20

andrewtite-haptiq opened this issue Mar 20, 2023 · 11 comments

Comments

@andrewtite-haptiq
Copy link

Normally when I start my Express API Server, I get:

Connected Database: db1
Application running on port: 5001

But when I run npx pythagora --initScript ./app/server.js --mode capture it doesn't seem to hit the callback in server.listen and I get this instead:

Connected Database: db1

I'm running Express as an API server for a React frontend with a Postgres DB.
I'm trying to use this on my Express API Server.

Can you please help?
I'm not sure how to get this to work.
Thanks.

@zvone187
Copy link
Contributor

Hi @andrewtite-webonise, thanks for bringing the convo here. What version of Pythagora are you using? We'll be releasing a new version today which might solve this issue.

@andrewtite-haptiq
Copy link
Author

andrewtite-haptiq commented Mar 21, 2023

@zvone187 That's would be absolutely amazing if you released a new version today that solves this.
I'm using Pythagora version "pythagora": "^0.0.29",

@andrewtite-haptiq
Copy link
Author

andrewtite-haptiq commented Mar 21, 2023

@zvone187 I also notice PostgrSQL is listed as "Upcoming".
That's my primary database.
Not sure if this is related or will cause issues.
I really want this package to work for me. It's kind of amazing if it works!

@zvone187
Copy link
Contributor

Hi Andrew, we just released it. You can install pythagora@0.0.31. With it, there are a couple of things changed (made easier). Now, you don't need to add any lines of code to your codebase + you can run pythagora with any command you're usually using to run your app.

For example, if you're running your app with "npm run start", now you run Pythagora with npx pythagora --init-command "npm run start". We also added a couple more commands that you can see here - https://github.com/Pythagora-io/pythagora#-options

So, you can just do npm i pythagora@0.0.31 and once that finishes run npx pythagora --init-command "npm run start" and you should be ready to go.

Let me know how it goes.

@andrewtite-haptiq
Copy link
Author

This should work with Express with Sequelize ORM using Postres?

@andrewtite-haptiq
Copy link
Author

It won't run. When I run it I receive the error:
Error: 'Pythagora is unable to check dependencies. Express and MongoDb are necessary for Pythagora to run. Exiting...

@zvone187
Copy link
Contributor

Ah yes, you're right. We disabled Pythagora for any database other than Mongodb since tests can show they PASSED even when they aren't if the database is not being mocked. Sorry...but I'll make sure to ping you once we add Postgres - that should be in a month or two.

@andrewtite-haptiq
Copy link
Author

That extremely disappointing.
I was excited to show this off working on our project.

@zvone187
Copy link
Contributor

zvone187 commented Mar 22, 2023

😞 I'll try to get postgres support out asap...

@andrewtite-haptiq
Copy link
Author

Thanks, bud. I appreciate it.
Keep up the good work.
I'm very impressed with this project.
It will save SO MUCH development time writing tests!
Keep me posted.
I Can't wait to hear back from you.

@zvone187
Copy link
Contributor

I'm closing this issue for now. Postgres is the next big feature we'll be implementing. Will update this issue once it's ready.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants