NEAR Blockchain
Text

Setting Up Your Development Environment

Lesson 2

I'm going to show you how to setup your development environment using what I use.  This is just one of many different ways to approach development and if you don't like the tools/methods I use - then by all means, set things up how it suits you.  In the end as long as you have something you can write and compile AssemblyScript code with - you're good to go.

If you want to follow along exactly as I do, then you'll need the following environment setup:

  1. Windows running Windows Sub-System for Linux 2 (WSL2) with Ubuntu 18.04 LTS
  2. Visual Studio Code (VSCode) with following extensions:  Remote-WSL and ESLint
  3. NodeJS - v14.15.4 - which automatically adds node package manager (npm).  You may want to consider nvm as well if you need to switch node versions for projects.
  4. Git
  5. A directory where you want to store your projects (good to stay organized)

None of this is rocket science to setup.  If any of it is for you at the moment, that's fine, but you have to understand that part of learning to code means figuring out problems.  You'll do a lot of Googling and asking questions which never really stops no matter how proficient you become.  So, this is what you need to install - over to you to figure out how to do that.

So, go ahead and do that, then come on back.  We'll quickly test you setup to make sure you're ready to go.

...insert appropriate elevator music or Jeopardy theme here...

Back already.  Good.  Next up, you should watch and/or follow along with the video walkthrough below.  In it we'll do the following:

  1. Open up VS Code to a new workspace
  2. Clone some boilerplate project code into a new project directory and open it up
  3. Write a very basic AssemblyScript contract and build it
  4. Visit NEAR wallet to create a TestNet account
  5. Use the account we create to create a new contract account belonging to our account and then deploy the contract code to the NEAR blockchain
  6. Use Near-CLI to see if the contract is working.  If it is, we know your development environment is good to go.
Pen
>