This project is auto dialog generator for Dungeons & Dragons games. The robot could response randomly per user input.
Run npm install
and add environment.ts file inside the src directory with following content:
Run npm run start
to start the project in http://localhost:4200/.
run npm run start:server
to start the project in http://localhost:3000/.
npm run ng serve -- --host=0.0.0.0 --disable-host-check
.- set port from private to public.
environment.ts
export class environment {
public static openAI = {
OPENAI_API_KEY: ''
}
}
environment.js
class environment {
static mongoDB = {
MONGODB_ATLAS_URI: 'mongodb+srv://slothbettyz:<password>@chatdnd.49dfejo.mongodb.net/?retryWrites=true&w=majority',
MONGODB_LOCAL_URI: 'mongodb://localhost:27017'
}
}
module.exports = environment;
Generated OpenAI private key in OpenAI API page and paste into the ''
above.
Generated MongoDb password paste into the <passward>
above.