This is one of fullstack projects in Take Home Projects section on freeCodeCamp written in TypeScript.
- As an authenticated user, I can keep my polls and come back later to access them.
- As an authenticated user, I can share my polls with my friends.
- As an authenticated user, I can see the aggregate results of my polls.
- As an authenticated user, I can delete polls that I decide I don't want anymore.
- As an authenticated user, I can create a poll with any number of possible items.
- As an unauthenticated or authenticated user, I can see and vote on everyone's polls.
- As an unauthenticated or authenticated user, I can see the results of polls in chart form.
- As an authenticated user, if I don't like the options on a poll, I can create a new option.
First of all install all deps:
yarn install
This will also build client side of the application.
Server part of the app requires some env variables. For development build they can be placed in server/.env
and then provided to the server side of the app with yarn env
like this:
yarn env node dist/
The following command can help to get some idea about what these variables are and how to name them:
git grep -A3 -B3 process.env
Once the environment is set up the easiest way to start is to run tmux script from the client dir:
cd client && bash start_tmux_session.sh
but this requires system-wide tmux installation.
To start without tmux:
- in case of dev env simply run
yarn start
in bothclient
andserver
dirs - in case of prod env build client side with
yarn build
and run server side with
NODE_ENV='production' yarn env yarn start