There are two options to open a file. Either you can open it through an API server or directly from hard disk.
Supported file formats: dwg, dwt, dxf (up to 2018)
Open file from hard disk
To open a file with editor you have to simply pass file path including file protocol prefix in fileUrl parameter to editor url.
Like this:
http://localhost/?fileUrl=file:////home/andrea/Documents/My%20Drawings/test.dwg
Please note that only view-only mode is supported when opening file from disk. It is required to open a file through API server if you want to open it in editing mode.