How to Specify the Rotating Axis of Geometry

For example, I want to open a box, how to let the lid of the box rotate along the edge line?

https://threejs.org/docs/index.html#api/en/core/Object3D.rotateOnAxis

var axis = new THREE.Vector3(0, 1,0);
obj.rotateOnAxis(axis,-Math.PI / 2);

%E5%BE%AE%E4%BF%A1%E5%9B%BE%E7%89%87_20190829173913
I want its axis to be on the left and right sides.