I downloaded GitHub - fauna-labs/fwitter: Fwitter is an example application that demonstrates the features and functionality of Fauna.. Set the REACT_APP_LOCAL___ADMIN to the admin key of my DB in .env.local which I renamed from .env.local.example :
npm run setup
> fwitter@0.1.0 setup
> node -r esm ./scripts/setup.js local
1. -- Collections and Indexes -- Creating collections
[ Failed ] 'accounts collection', with error: [Unauthorized: unauthorized] {
description: 'Unauthorized',
requestResult: RequestResult {
method: 'POST',
path: '',
query: null,
requestRaw: '{"if":{"exists":{"collection":"accounts"}},"then":true,"else":{"create_collection":{"object":{"name":"accounts"}}}}',
requestContent: Expr { raw: [Object] },
responseRaw: '{"errors":[{"code":"unauthorized","description":"Unauthorized"}]}',
responseContent: { errors: [Array] },
statusCode: 401,
responseHeaders: [Object: null prototype] {
':status': 401,
'www-authenticate': 'Basic realm="Unauthorized"',
'x-txn-time': '1654778094801210',
'x-faunadb-build': '220606.221709-701b8fc',
'content-length': '65',
'content-type': 'application/json;charset=utf-8',
[Symbol(nodejs.http2.sensitiveHeaders)]: []
},
startTime: 1654778094732,
endTime: 1654778094830
}
}
Any ideas?