"2. In every province in which there now is, or shall hereafter be established, a court of first instance, courts of justice of the peace shall be established in every municipality thereof which shall be organized under the municipal code, or which has been organized and is being conducted as a municipality when this act shall take effect, under and by virtue of the municipal code."