First make sure, all the needed prerequisites are met.
-
Choose a template for the new project: While you could start out with a blank Node.js project, we recommend to begin with
pc-nrfconnect-boilerplate
. You could also begin with a more full fledged project like apc-nrfconnect-ble
or a smaller one likepc-nrfconnect-rssi
and strip out what you do not need, but our recommendation is to just look at these for reference. If you choose something different than usingpc-nrfconnect-boilerplate
, then adjust the next step accordingly. -
Clone
pc-nrfconnect-boilerplate
under the~/.nrfconnect-apps/local
directory. In a terminal on Linux/macOS or Git bash on Windows:cd $HOME/.nrfconnect-apps/local git clone https://github.com/NordicSemiconductor/pc-nrfconnect-boilerplate.git pc-nrfconnect-myapp cd pc-nrfconnect-myapp rm -rf .git
If you prefer it, you can also create the project directory anywhere else and create a symbolic link from
~/.nrfconnect-apps/local
to the project directory. -
Modify relevant properties in
package.json
. At least consider changing:name
displayName
description
homepage
version
author
license
repository.url
You now have everything set up for
everyday app development, so read up about that. Then
change the implementation in index.tsx
to adjust the behavior of the app.
Read the further documentation beginning with the API reference and source code of the official apps to get a more thorough understanding of how apps work.