zhouhao27 / Parse-Server-ES6-Example

A parse server example with ES6. Dashboard is coming with the server in Development mode.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

async and await

ksngits opened this issue · comments

Hi,

If I want to use async and await, what should I do to the following code?

SyntaxError: a3/Parse-Server-ES6-Example/server.js: await is a reserved word (67:15)
[0] 65 | httpServer.listen(SERVER_PORT);
[0] 66 |
[0] > 67 | const schema = await config.database.loadSchema();
[0] | ^
[0] 68 |
[0] 69 | //var parseLiveQueryServer = ParseServer.createLiveQueryServer(httpServer);
[0] 70 |

I am getting the above error. Please help me. Thanks

Please ignore. I was completely wrong with the above syntax and fixed it. Thanks