Fix paths to creds and in README
This commit is contained in:
parent
73b13a044d
commit
4103932b00
2 changed files with 5 additions and 5 deletions
|
|
@ -40,7 +40,7 @@ Make sure to build the server with either `npm run build` or `npm run watch`.
|
||||||
|
|
||||||
To authenticate and save credentials:
|
To authenticate and save credentials:
|
||||||
|
|
||||||
1. Run the server with the `auth` argument: `node build/gdrive auth`
|
1. Run the server with the `auth` argument: `node ./dist auth`
|
||||||
2. This will open an authentication flow in your system browser
|
2. This will open an authentication flow in your system browser
|
||||||
3. Complete the authentication process
|
3. Complete the authentication process
|
||||||
4. Credentials will be saved for future use
|
4. Credentials will be saved for future use
|
||||||
|
|
@ -49,7 +49,7 @@ To authenticate and save credentials:
|
||||||
|
|
||||||
After authenticating:
|
After authenticating:
|
||||||
|
|
||||||
1. Run the server normally: `node build/gdrive`
|
1. Run the server normally: `node ./dist`
|
||||||
2. The server will load the saved credentials and start
|
2. The server will load the saved credentials and start
|
||||||
|
|
||||||
Note: If you haven't authenticated yet, the server will prompt you to run with the `auth` argument first.
|
Note: If you haven't authenticated yet, the server will prompt you to run with the `auth` argument first.
|
||||||
|
|
@ -175,7 +175,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
||||||
|
|
||||||
const credentialsPath = path.join(
|
const credentialsPath = path.join(
|
||||||
path.dirname(new URL(import.meta.url).pathname),
|
path.dirname(new URL(import.meta.url).pathname),
|
||||||
"../../.gdrive-server-credentials.json",
|
"../../../.gdrive-server-credentials.json",
|
||||||
);
|
);
|
||||||
|
|
||||||
async function authenticateAndSaveCredentials() {
|
async function authenticateAndSaveCredentials() {
|
||||||
|
|
@ -183,7 +183,7 @@ async function authenticateAndSaveCredentials() {
|
||||||
const auth = await authenticate({
|
const auth = await authenticate({
|
||||||
keyfilePath: path.join(
|
keyfilePath: path.join(
|
||||||
path.dirname(new URL(import.meta.url).pathname),
|
path.dirname(new URL(import.meta.url).pathname),
|
||||||
"../../gcp-oauth.keys.json",
|
"../../../gcp-oauth.keys.json",
|
||||||
),
|
),
|
||||||
scopes: ["https://www.googleapis.com/auth/drive.readonly"],
|
scopes: ["https://www.googleapis.com/auth/drive.readonly"],
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue