Beachat is an IRC-like chat client/server written in Javascript for a networking class at Portland State University. The intention is to use socket connections to allow multiple clients to connect to a server, manage multiple chat rooms, and even provide a rudimentary history feature like that found in Discord.
- Copy
/server/.env.sample
to/server/.env
and update with the desired port. - Inside the
/server
directory, runnpm i
- If you wish to clear the database, remove
/server/database.db
and inside the/server
directory, runnpm run init
Note: If building with Node v17+ (as installed on google cloud instances), there is a bug which requires using the legacy openssl provider.
- Edit
/client/src/App.vue
and change theWebSocket("ws://localhost:8080...")
line to reflect your backend server url and port. - If you will be serving from a subdirectory, copy
vue.config.js.example
tovue.config.js
, then edit thepublicPath
parameter to match your subdirectory. For example: `publicPath: "/mysubdirectory/" - Edit
/client/public/index.html
and update theContent-Security-Policy
meta tag to allow connections to your backend server. The default setup is for localhost and my server. - Inside the
/client
directory, runnpm i
- If on Google cloud, run
export NODE_OPTIONS=--openssl-legacy-provider && npm run build
, otherwisenpm run build
should work. - Copy the contents of
/client/dist
to your web server's public directory.
- Inside the
/server
directory, runnpm run serve