How can I get the path that the application is running with typescript?

前端 未结 4 1005
孤独总比滥情好
孤独总比滥情好 2020-12-29 05:32

I am trying to create a desktop application with electron, angular2, typescript and neDB.In order to be able create a \'file\' database with neDB I want the path to my proje

4条回答
  •  攒了一身酷
    2020-12-29 06:16

    Writing data to the application installation directory is generally a bad idea since the user running the app may not have permission to write files to that directory. What you should probably do instead is create the database file at the location returned by app.getPath('userData').

提交回复
热议问题