2024-02-05 12:40:51 +00:00
|
|
|
const sdk = require('node-appwrite');
|
|
|
|
|
|
2024-02-21 11:31:50 +00:00
|
|
|
const client = new sdk.Client()
|
2024-02-05 12:40:51 +00:00
|
|
|
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
|
|
|
|
.setProject('5df5acd0d48c2') // Your project ID
|
2024-02-21 11:31:50 +00:00
|
|
|
.setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key
|
2024-02-05 12:40:51 +00:00
|
|
|
|
2024-02-21 11:31:50 +00:00
|
|
|
const users = new sdk.Users(client);
|
2024-02-05 12:40:51 +00:00
|
|
|
|
2024-02-27 08:12:00 +00:00
|
|
|
const result = await users.createBcryptUser(
|
2024-02-24 11:34:42 +00:00
|
|
|
'<USER_ID>', // userId
|
2024-02-21 11:31:50 +00:00
|
|
|
'email@example.com', // email
|
|
|
|
|
'password', // password
|
2024-02-24 11:34:42 +00:00
|
|
|
'<NAME>' // name (optional)
|
2024-02-21 11:31:50 +00:00
|
|
|
);
|