waterthetrees / wtt_server

Water The Trees Postgres/Express/Node.js backend
https://waterthetrees.com
Creative Commons Zero v1.0 Universal
0 stars 3 forks source link

have id geohash as npm module #99

Closed zoobot closed 2 years ago

zoobot commented 2 years ago

Has new repo unique tree id based off geohash, sourceid, AND unique common name, scientific name, city?

zoobot commented 2 years ago

If you are going to test the db migrations wtt_db waterthetrees/wtt_front#29 with having a treetype or trees table for each species of tree, this may change the tree ids are created and also fix the bad tree naming issue: waterthetrees/wtt_front#237 . We may want to separate geohash and sourceid/city function from the common/scientific name part of the tree id.

jazhen commented 2 years ago

The id code has been moved to a npm package: https://www.npmjs.com/package/@waterthetrees/tree-id

jazhen commented 2 years ago

I need to change the package type to "module", update the readme, and replace any calls to createIdForTree to use the library instead.