Skip to content
Draft
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
6 changes: 3 additions & 3 deletions app/actions.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
'use server';
import { tables } from 'harperdb';
import { tables } from 'harper';
const { Product } = tables;
import { initAlgolia, initOpenai } from '@/lib/utils';

// Harper DB Server Actions
export async function listProducts(conditions = {}) {
const products = [];
const results = Product.search(conditions);
const results = Product.search(conditions);
for await (const product of results) {
products.push(product);
}
Expand All @@ -28,7 +28,7 @@ export async function updateUserTraits(id = "1", traits) {

// Algolia Search Server Actions
const algoliaClient = initAlgolia();
export async function searchProducts(searchTerm = ''){
export async function searchProducts(searchTerm = '') {
if (algoliaClient) {
return await algoliaClient.searchSingleIndex({
indexName: 'productdata',
Expand Down
2 changes: 1 addition & 1 deletion app/products/[id]/page.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import 'harperdb';
import 'harper';
import ProductPage from './product-page';
import { listProducts, getProduct } from '@/app/actions';

Expand Down
5 changes: 2 additions & 3 deletions config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@ graphqlSchema:
files: '*.graphql'
jsResource:
files: './resources.js'
'@harperdb/nextjs':
package: '@harperdb/nextjs'
files: '/*'
'@harperfast/nextjs':
package: '@harperfast/nextjs'
14 changes: 5 additions & 9 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
const { withHarper } = require('@harperfast/nextjs');

const nextConfig = {
reactStrictMode: false,
eslint: { ignoreDuringBuilds: true, },
images: { unoptimized: true },
webpack: (config) => {
config.externals.push({
harperdb: 'commonjs harperdb',
});
return config;
},
eslint: { ignoreDuringBuilds: true, },
images: { unoptimized: true },
};

module.exports = nextConfig;
module.exports = withHarper(nextConfig);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Set "type": "module" in the package.json, then you can use export:

Suggested change
module.exports = withHarper(nextConfig);
exports default withHarper(nextConfig);

Copy link
Copy Markdown
Member Author

@BboyAkers BboyAkers May 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmmm unfortunately that caused more issues i'd have to address. Once i've gotten the patches applied i'll look into stacking this onto it post-merging this PR! 😃

Loading