Skip to content

Neirth/ToDoApp

Repository files navigation

This is a Todo WebApplication using C++ and IndexedDB as base.

Why this project?

This project is designed to testing a mix of technologies, such as Asm.js, Fruit (From Google), IndexedDB, Conan, JsonCPP, and WebComponents. This project, trutly, it won't make your life easier, but can inspire for make a more useful and interesting project with C++ for Web Platforms.

Even so, if your idea is to have the panacea of writing a single application for the Web, iOS or Android. I highly recommend watching Kotlin Multiplatform or Flutter, it will save you a lot of headaches.

A small example of why these techniques may not be sufficient for the needs of your application: The (not so) hidden cost of sharing code between iOS and Android

Installation

For build this project, we must be configure before a Conan Dependency System, Cmake Build System and Emscripten WebAssembly SDK

The same steps are required if we desired develop the project using Visual Studio Code, please, in this case, run these commands before start developing:

[neirth@codespace todoapp]$ mkdir buildjs && cd buildjs # or name the folder as 'build' for develop with Visual Studio 
[neirth@codespace buildjs]$ sed -i 's/codespace/{YOUR_UNIX_USERNAME}/g' ../emscripten.profile # For point into correct emsdk path
[neirth@codespace buildjs]$ conan install -pr ../emscripten.profile ../conanfile.txt --build=fruit --build=jsoncpp --build=sqlite3
[neirth@codespace buildjs]$ emcmake cmake build ..
[neirth@codespace buildjs]$ make -j 8
[neirth@codespace buildjs]$

Usage

After build the project, copy the content of the folder ./example into your web server, or run this

[neirth@codespace todoapp]$ cd ./example
[neirth@codespace example]$ python -m http.server
Serving HTTP on 0.0.0.0 port 8000 (http://0.0.0.0:8000/) ...

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT