-
Notifications
You must be signed in to change notification settings - Fork 28
Run ClassTranscribe Frontend (Frontend Only, No Docker)
If you only want to work on the Frontend and have a low powered laptop (or don't want to use Docker), you can develop the frontend website just using Node.js and yarn.
Visual Studio Code is highly recommended for beginners to write Javascript and execute git commands. (Working with Javascript, Working with Git) After downloading the VS Code, go to the Extension Tab on the sidebar. You can install many useful extensions for frontend development:
- Docker - The Docker extension makes it easy to build, manage and deploy containerized applications from Visual Studio Code.
- React/Redux/GraphQL/React-Native snippets - This extension provides you JavaScript and React/Redux snippets in ES7 with Babel plugin features for VS Code.
- HTML Snippets - This extension adds rich language support for the HTML Markup to VS Code.
- GitLens - GitLens supercharges the Git capabilities built into Visual Studio Code.
Please go through each of the following steps to set up the front-end locally.
- Clone
FrontEnd
to your machine, and enter the repo
$ git clone https://github.com/classtranscribe/FrontEnd.git && cd FrontEnd
-
Install Node Version manager. Here's some instructions installation on Windows,Linux and OSX].
-
The project has a
.nvmrc
file which contains the node version. Make sure you're in theFrontEnd/
folder and then run:
$ nvm install
$ nvm use
$ node -v
If you have lots of different node projects you can look into automatically switching to the .nvmrc
version as you enter the directory.
-
Install yarn.
-
Use yarn to install Node.js dependencies.
$ yarn install
- Change the backend address (Optional). Type
yarn backend -h
for help.
$ yarn backend --dev
- Run the app at localhost:3000 This will take a while (a minute or so) initially but is much faster when you make a change
$ yarn start
-
if you are getting the error "There might be a problem with the project dependency tree" follow the steps on this link
-
Run the build process and local test cases to ensure everything works (if start worked, these will probably work too).
$ yarn test
$ yarn build
Now as you edit the frontend code it will automatically rebuild and reload the app in your browser. In the development server you can use the test user to login.
For more details about the existing frontend structure and components, see Front-End Structure