  We report on the realization of a displacement sensor based on an optical
nanofiber. A single gold nano-sphere is deposited on top of a nanofiber and the
system is placed within a standing wave which serves as a position ruler.
Scattered light collected within the guided mode of the fiber gives a direct
measure of the nanofiber displacement. We calibrated our device and found a
sensitivity up to 1.2~nm/$\sqrt{\text{Hz}}$. A mechanical model based on the
Mie scattering theory is then used to evaluate the optically induced force on
the nanofiber by an external laser. With our sensing system, we demonstrate
that an external force of 1~pN applied at the nanofiber waist can be detected.
