How would you add a shapefile to the map using the JS API? Thanks!
Here is the documentation and sample.
I am not using the Portal. Is there another way? Thanks!
You don't need to be using portal to use the sample that Samuel linked to above - it just uses esriRequest to add the shapefile using the Portal REST API.
This way uses Leaflet calvinmetcalf/leaflet.shapefile · GitHub
Or you can try using Simple DynamicMapLayer | Esri Leaflet
--> with the last one, you don't need Portal.
I think this question comes up periodically. Here's a discussion from back in January which might help you:
How to add a shapefile without ArcGIS Online
Retrieving data ...