Several people have asked about how to set up web2py to work with React 
(and Typescript) on the front end. Others have asked how to use an IDE like 
Visual Studio Code with web2py. I have a setup that I've posted to github 
that has the basics in place for doing this with a pre-configured Visual 
Studio Code workspace and instructions on how to get it up and running.  
 Web2py running inside VSCode is really easy to work with and debug!

https://github.com/larrywberg/web2py-react-ts-vscode

I am not an expert on Visual Studio Code, or React, or Typescript, or 
web2py so I would be happy to get feedback to improve it.  I hope this is 
useful for others.  It is using React with React Hooks for state 
management.  There is a sample REST call set up.

I hooked in a webpack dev server in addition to the web2py server so that 
the react sample code can be iterated on quickly if you so choose.  You can 
debug the python server and the Typescript client at the same time in 
VSCode if you launch them both from the preconfigured launch tasks. You can 
also use the Web2py admin interface to edit files in parallel with editing 
them in VS Code when running locally.  There are other preconfigured 
scripts set up and you can also trigger the compile of the react code from 
a menu item in the sample code.





-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/0dc1a393-0bee-4e49-bf4d-8cd252c0dea7%40googlegroups.com.

Reply via email to