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

[cli] add repl #26

Open
whatwewant opened this issue Jul 26, 2021 · 2 comments
Open

[cli] add repl #26

whatwewant opened this issue Jul 26, 2021 · 2 comments

Comments

@whatwewant
Copy link
Member

Why

  • Django has python manage.py shell
@whatwewant whatwewant changed the title [REPL] add repl [cli] add repl Jul 26, 2021
@whatwewant
Copy link
Member Author

whatwewant commented Jul 26, 2021

@whatwewant
Copy link
Member Author

require('module-alias/register');

import * as repl from 'repl';
import { Application } from './app';

const app = new Application();

const shell = repl.start('>');
shell.context.app = app;
shell.context.ctx = app.createAnonymousContext();

app
  .prepare()
  .then(() => {
    console.log('load done');
  });

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

1 participant