Log of attempts to move it at hand.
See this.
.
You have to use Node version >= 17.5!
% node -vv21.2.0
all you need to do is to change the payment provider in
provider.service.tsto the provider you want to use.
ts
export class ProviderService {
constructor(private readonly prisma: PrismaService) {
this.paymentProvider = new StripeProvider({
prisma,
secret: process.env.PAYMENT_KEY,
country: 'US',
});
}
You need to set this up to use Stripe, but ignore it for now.
% npm install
:
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: 'next-auth@4.18.8',
npm WARN EBADENGINE required: { node: '^12.19.0 || ^14.15.0 || ^16.13.0 || ^18.12.0' },
npm WARN EBADENGINE current: { node: 'v21.2.0', npm: '10.2.3' }
npm WARN EBADENGINE }
Why do I have to install next-auth with npm to get Docker up and running? Ignore it for now.
$ npm run docker:up
The container stood up.
$ npm install -g yarn
$ yarn install
$ cp .env.example .env.local
$ yarn dev -p 3001
At least I got it up and running.
What is API key required?
NEXT_PUBLIC_FINGERPRINT_KEY.Somewhere around here, you can delete the clone from the original. https://github.com/Naokiakazawa/simplegrants/tree/verification (akazawa-san was sitting next to me, so I decided it would be more efficient)
.
It's not in the .env sample, but [code https://github.com/supermodularxyz/simplegrants/blob/main/frontend/pages/api/auth/%5B.... .nextauth%5D.ts], but I'm reading the configuration from process.env.
Setting up OAuth 2.0 - Google Cloud Platform Console Help
I set up a mess and put in GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET, but '"ikm" must be at least one byte in length'.
NEXTAUTH_SECRET.
$ openssl rand -base64 32We made it this far.
. There is no mention of that in the README.
yarn install and yarn dev -p 3001, so it seems to work normally.# Prisma ENV
DATABASE_URL="postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${DATABASE_CONTAINER}:5432/${POSTGRES_USER}?schema=public&connect_timeout=300"
networks: simplegrants-like settings in docker-compose.yaml, etc., this is important, maybedocker compose with project root
$ docker compose -f docker-compose.dev.yml up --buildThen initialize DB with root/backend
$ cd backend$ yarn setup
:All migrations have been successfully applied.
Environment variables loaded from .env
Running seed command `ts-node prisma/seed` ...
An error occurred while running the seed command:
Error: Command failed with ENOENT: ts-node prisma/seed
spawn ts-node ENOENT
.
http:// into https://.Publishing status: In production
2024-01-31 02:44:34.623 UTC [93] FATAL: no PostgreSQL user name specified in startup packet$ docker compose -f docker-compose.dev.yml up --builddocker-compose.dev.yml, so .env.local is read, not .env.production.I was able to do it by starting over from docker compose!
This page is auto-translated from /nishio/SimpleGrants using DeepL. If you looks something interesting but the auto-translated English is not good enough to understand it, feel free to let me know at @nishio_en. I'm very happy to spread my thought to non-Japanese readers.