Last active
May 23, 2018 11:26
-
-
Save hugomd/f120507ad036ac99479ec2390a54627b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+ const createUser = async username => { | |
+ try { | |
+ await axios.post('http://localhost:3001/users', {username}); | |
+ } catch ({message}) { | |
+ throw new Error(`Failed to create a user, ${message}`); | |
+ } | |
+ }; | |
const main = async () => { | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment