Skip to content
This repository has been archived by the owner on Dec 9, 2022. It is now read-only.

[question] Can you use hot reload in backend? #2

Open
alvaro-canepa opened this issue Jan 29, 2020 · 3 comments
Open

[question] Can you use hot reload in backend? #2

alvaro-canepa opened this issue Jan 29, 2020 · 3 comments

Comments

@alvaro-canepa
Copy link

I'm using this library in backend, but I couldn't find any way to use development serve using current OC installation (I use Homestead locally). I need to made changes and run yarn build to construct js files and them, see that on currentProject.local/backend/....

Do you know if is possible to have hot reload working in a homestead instance?
Thanks.

@martin-badin
Copy link
Owner

I don't know. I was using this library only on the frontend.

@alvaro-canepa
Copy link
Author

But how use to it in localhost:8080 without OC instance to run request methods?

Thanks and sorry for the inconvenience ;)

@martin-badin
Copy link
Owner

You can use this plugin directly

this.$october.request({
  handler: "onSubmit",
  formData
  // onLoading: onLoading,
  // onError: onError,
  // onSuccess: onSuccess,
  // redirect: "/"
});

or you can use this plugin as an attr on the form element

<form
  v-october:request.prevent="{
    'handler': 'onSignin',
    'onLoading': onLoading,
    'onError': onError,
    'onSuccess': onSuccess,
    'redirect': '/'
  }"
>
  <text-input
    v-model="login"
    label="Email"
    name="login"
    placeholder="Enter your email"
  />

  <text-input
    v-model="password"
    label="Password"
    name="password"
    placeholder="Choose a password"
    type="password"
  />

  <button
    :disabled="errors.any()"
    type="submit"
  >Login</button>
</form>

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

No branches or pull requests

2 participants