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

devtool: Add --repl flag to start app in interactive node shell #1617

Merged
merged 1 commit into from
Jan 26, 2023
Merged

Conversation

knolleary
Copy link
Member

This adds support for starting FlowForge with an interactive shell, much like the standard node repl.

Within the node shell, app is the FlowForge application instance.

[2023-01-26T10:34:51.877Z] INFO: ****************************************************
[2023-01-26T10:34:51.878Z] INFO: * FlowForge is now running and can be accessed at: *
[2023-01-26T10:34:51.878Z] INFO: *   http://localhost:3000                          *
[2023-01-26T10:34:51.878Z] INFO: ****************************************************
[2023-01-26T10:34:51.925Z] INFO: Connected to SMTP server
[2023-01-26T10:34:52.023Z] INFO: Connected to comms broker
[2023-01-26T10:34:52.485Z] DEBUG: [localfs] Restarting projects
[2023-01-26T10:34:52.485Z] DEBUG: [localfs] Checking project status
[2023-01-26T10:34:52.509Z] DEBUG: [localfs] Project 1e7bb9d0-36e5-40dd-888f-6927a635bc5b port 7880
[2023-01-26T10:34:52.510Z] DEBUG: [localfs] Project ac8e4995-cb47-42ec-a9a4-71c42366c7f3 port 7881

FF => const projects = await app.db.models.Project.findAll()
undefined
FF => projects[0].name
'fantastic-shelduck-8877'
FF =>

It can be run in any of the following ways:

  • node forge/app.js --repl
  • npm run repl
  • npm run serve-repl

Copy link
Contributor

@Pezmc Pezmc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems useful

Copy link
Contributor

@Steve-Mcl Steve-Mcl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Passing cleanly, looks good.

@Steve-Mcl Steve-Mcl merged commit a352911 into main Jan 26, 2023
@Steve-Mcl Steve-Mcl deleted the repl branch January 26, 2023 11:08
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

Successfully merging this pull request may close these issues.

3 participants