chore: remove backend/test-create-user.js
This commit is contained in:
@@ -1,33 +0,0 @@
|
|||||||
// Simple test to create test user
|
|
||||||
const https = require('http');
|
|
||||||
|
|
||||||
const data = JSON.stringify({
|
|
||||||
name: '测试用户',
|
|
||||||
email: 'test@example.com'
|
|
||||||
});
|
|
||||||
|
|
||||||
const options = {
|
|
||||||
hostname: 'localhost',
|
|
||||||
port: 3001,
|
|
||||||
path: '/api/users',
|
|
||||||
method: 'POST',
|
|
||||||
headers: {
|
|
||||||
'Content-Type': 'application/json',
|
|
||||||
'Content-Length': data.length
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
const req = https.request(options, (res) => {
|
|
||||||
console.log(`Status Code: ${res.statusCode}`);
|
|
||||||
|
|
||||||
res.on('data', (d) => {
|
|
||||||
process.stdout.write(d);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
req.on('error', (error) => {
|
|
||||||
console.error(error);
|
|
||||||
});
|
|
||||||
|
|
||||||
req.write(data);
|
|
||||||
req.end();
|
|
||||||
Reference in New Issue
Block a user