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

run web interface standalone with a mock API server #41

Closed
proddy opened this issue Apr 1, 2021 · 3 comments
Closed

run web interface standalone with a mock API server #41

proddy opened this issue Apr 1, 2021 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@proddy
Copy link
Contributor

proddy commented Apr 1, 2021

When developing and testing the web interface, it's handy not to bother with reflashing an ESP32 each time. The idea is to mimic the ESP using a mock/stub server that responds to HTTP POST and GET requests.

Currently a first draft at this is in the ft_mockapi branch. To run it do

% cd interface
% npm run dev

The hardcoded data is limited at the moment and can be easily extended by changing the file /mock-api/server.js

@proddy proddy added the enhancement New feature or request label Apr 1, 2021
proddy added a commit that referenced this issue Apr 1, 2021
@proddy proddy self-assigned this Apr 1, 2021
@bbqkees
Copy link
Contributor

bbqkees commented Apr 2, 2021

I tried it and it looks great.

One thing: I got an error during the build; had to install the express module, and then it worked fine.

To install Express:
npm install express

@proddy
Copy link
Contributor Author

proddy commented Apr 3, 2021

fixed that and updated the doc. https://github.com/emsesp/EMS-ESP32/blob/ft_mockapi/mock-api/README.md

@proddy proddy closed this as completed Apr 5, 2021
@proddy
Copy link
Contributor Author

proddy commented Apr 5, 2021

merged into dev

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

No branches or pull requests

2 participants