This repository holds the source code of the survey.io quickstart with React and potentially a good starting point for your application.
It's been extended with testing support so you can start writing tests immediately.
Node.js and npm are essential to Angular and SurveyJS development.
Get it now if it's not already installed on your machine.Verify that you are running at least node v4.x.x
and npm 3.x.x
by running node -v
and npm -v
in a terminal/console window.
Older versions produce errors.
We recommend nvm for managing multiple versions of node and npm.
Clone this repo into new project folder (e.g., my-proj
).
git clone https://github.com/surveyjs/surveyjs_react_quickstart my-proj
cd my-proj
See npm and nvm version notes above
Install the npm packages described in the package.json
and verify that it works:
npm install
npm start
Doesn't work in Bash for Windows which does not support servers as of January, 2017.
The npm start
command first compiles the application,
then simultaneously re-compiles and runs the server.
Both the compiler and the server watch for file changes.
Shut it down manually with Ctrl-C
.
You're ready to write your application.
We've captured many of the most useful commands in npm scripts defined in the package.json
:
Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.
The page will reload if you make edits.
You will also see any lint errors in the console.
Launches the test runner in the interactive watch mode.
See the section about running tests for more information.
Builds the app for production to the build
folder.
It correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes.
Your app is ready to be deployed!