-
Notifications
You must be signed in to change notification settings - Fork 12
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
YKY test runtime and cleanups #79
Conversation
import { Operations } from "./YKYOperations"; | ||
|
||
// Initialize Operon. | ||
export const operon = new Operon({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in other demos, we read connection info in the migration file via parseConfigFile
. Can we do that here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ultimately, someone else is going to do all those things, and call us when it is the right time to take migration steps.
(FWIW, parsing the file is a better way to get it wrong. In a real app, the credentials passed in would have escalated privileges to alter the database, compared to the runtime code which has CRUD only.)
yky-social/README.md
Outdated
|
||
```shell | ||
npm run build | ||
npm run dev | ||
POSTGRES_HOST=localhost POSTGRES_PORT=5444 POSTGRES_USERNAME=socialts POSTGRES_PASSWORD=socialts POSTGRES_DATABASE=socialts npm run createschema |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we already said we need these env variables. So we probably don't need to repeat it again.
I missed the npm run createschema
command because it was hidden behind a long list of envs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was torn, if I do it without the env vars, it isn't something you can cut+paste and have just work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I split the line.
I followed the instructions and it worked on my local machine. I can log in and post, but S3 upload always fails. Is it because the bucket is not accessible? Seems that we also need to set an env |
Another good catch. If your bucket is not called 'yky-social-photos', yes, and it should really be in the app config file. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested on my local machine and it works. It took me a while to realize the CORS setting on the S3 bucket side but otherwise worked smoothly.
Use test runtime
Code cleanups on frontend
This still waits for init hooks so that the
npx
version will run properly (create its database tables).