Experimenting with share logic between html and node