Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .env.default
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CB_USERNAME=Administrator
CB_PASSWORD=password
CB_CONNECT_STRING=localhost
CB_CONNECT_STRING=couchbase://localhost
CB_BUCKET=user_profile
4 changes: 2 additions & 2 deletions .github/workflows/cb-service-container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
node-version: [24.x]
steps:
- name: Update repositories
run: |
apt update || echo "apt-update failed" # && apt -y upgrade
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Setup couchbase
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ To deploy this project on Vercel, you will need:
To run this project locally, you will need:

- A Couchbase Capella database or Couchbase 7+ database running locally
- Node.js & NPM
- Node.js 24 LTS and npm
- Next.js
- Code Editor

Expand All @@ -75,7 +75,7 @@ We've included a `.env.local.example` file with blank values for you to copy int
- `CB_USERNAME` - The username of an authorized user on your database. Follow [these instructions](https://docs.couchbase.com/cloud/clusters/manage-database-users.html#create-database-credentials) to create database credentials on Capella.
- `CB_PASSWORD` - The password that corresponds to the user specified above.
- `CB_CONNECT_STRING` - The Couchbase connection string. Use the connection string specified on the 'Connect' tab within Capella (formatted like `couchbases://cb.<xxxxxx>.cloud.couchbase.com`) or `couchbase://localhost` for a local/Docker database.
- `CB_BUCKET` - The bucket you'd like to connect to. Set this to `user_profiles` for this template.
- `CB_BUCKET` - The bucket you'd like to connect to. Set this to `user_profile` for this template.

### Set up and Run The Application

Expand Down Expand Up @@ -107,7 +107,7 @@ Now we're ready to run our application:
npm run dev
```

If everything is configured properly, you should be able to navigate to localhost:3000 to see the example application. For troubleshooting and additional setup instructions please refer to the `NextJS_README.md` included in the with-couchbase starter.
If everything is configured properly, you should be able to navigate to localhost:3000 to see the example application. For troubleshooting and additional setup instructions, refer to the notes in this README and the upstream `with-couchbase` starter documentation.

## Sample Data

Expand Down
12 changes: 12 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { defineConfig } from "eslint/config";
import nextVitals from "eslint-config-next/core-web-vitals";

export default defineConfig([
...nextVitals,
{
rules: {
"no-unused-vars": ["error", { vars: "all", args: "after-used", ignoreRestSiblings: false }],
semi: ["error", "always", { omitLastInOneLineBlock: true }]
}
}
]);
12 changes: 6 additions & 6 deletions jest.config.mjs
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import nextJest from 'next/jest.js'
import nextJest from 'next/jest.js';

const createJestConfig = nextJest({
// Provide the path to your Next.js app to load next.config.js and .env files in your test environment
dir: './',
})
});

// Add any custom config to be passed to Jest
/** @type {import('jest').Config} */
const config = {
// Add more setup options before each test is run
// setupFilesAfterEnv: ['<rootDir>/jest.setup.js'],
setupFiles: ['<rootDir>/jest.setup.js'],

testEnvironment: 'jest-environment-jsdom',
}
testEnvironment: 'node',
};

// createJestConfig is exported this way to ensure that next/jest can load the Next.js config which is async
export default createJestConfig(config)
export default createJestConfig(config);
9 changes: 9 additions & 0 deletions jest.setup.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { TextDecoder, TextEncoder } from 'node:util';

if (!global.TextEncoder) {
global.TextEncoder = TextEncoder;
}

if (!global.TextDecoder) {
global.TextDecoder = TextDecoder;
}
9 changes: 9 additions & 0 deletions next.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
outputFileTracingIncludes: {
'/': ['./node_modules/@couchbase/**/*'],
'/api/user': ['./node_modules/@couchbase/**/*'],
},
};

export default nextConfig;
Loading
Loading