Coding for NXT Crypto Platform #1: Configuration
Setting up the config File
The configuration file of Nxt is an important tool for you to setup how Nxt works on your computer.
The configuration file
You already have a configuration file you can see all current settings
For developing purposes, please create a file in nxt/conf/ and name it nxt.properties
Please copy the code below in your nxt.properties file.
# Enable Cross Origin Filter for the API server. nxt.apiServerCORS=true # Enable Cross Origin Filter for NRS user interface server. nxt.uiServerCORS=true
If you want to develop on testnet, please add
# Never unlock your real accounts on testnet! Use separate accounts for testing only. # When using testnet, all custom port settings will be ignored, # and hardcoded ports of 6874 (peer networking), 6875 (UI) and 6876 (API) will be used. nxt.isTestnet=true
Instead of hosting Nxt yourself, you can decide to get information from any other node in the Nxt network. In my examples, I will be using http://localhost:7876. This is when you are using Nxt on your personal computer or server. A list of other nodes you could use for displaying data on your website or access Nxt can be found on websites that provide access to the Nxt network like Nxtpeers.com or PeerExplorer.com
Instead of using http://localhost:7876 you could then, for example, enter an IP like http://x.x.x.x:7876 to get information from a node instead of localhost.
When you want to have control over the node, which version it runs, which information can be accessed or how many data sets the API retrieves, it makes sense to have your own node running with the configuration you prefer.
Also see: http://nxter.org/developers
Latest posts by Guest author (see all)
- Coding for NXT Crypto Platform #1 - 23/11/2016
- Coding for NXT Crypto Platform #2 - 23/11/2016
- Coding for NXT Crypto Platform #3: Output from the Asset Exchange - 23/11/2016
View this in: Español