DEV Community

Noel Worden
Noel Worden

Posted on • Edited on

Elixir/Phoenix Project: Project Setup

Goals:

  • Create new Elixir/Phoenix project and get it running on my local machine
  • Initialize git and push to Github

Before I took the dive in creating my new Elixir/Phoenix project I did what I bet most people would do, and typed something like Creating Elixir Phoenix Project into my favorite search engine. That produced plenty of hits, and I looked at the first steps of a handful of them. Then I took a look at hexdocs. What is hexdocs? Hexdocs is the source of documentation for all the hex packages for Erlang (which is the base language for Elixir). Pheonix is a package for Elixir, and is managed by hex, and as a result has amazing documentation.

Create new project and get it running on my local machine

I took a look at the other blog posts and tutorials to just double check there wasn't something new or improved from the official docs that I should incorporate into my new project. It appears that everyone is going through the same steps as is recommended in the documentation, so thats what I did. If you are new to Elixir/Phoenix you might be surprised by just how good the hexocs are. In fact, they are so good that I'm not going to rewrite the step-by-step instructions, but instead simply include the links for installation and how to get a project up an running.

Initialize git and push to Github

With the new project working locally, I wanted to get it pushed up to Github. Again, great documentation for this whole process. First, I needed to initialize git in my newly created project folder. The documentation for that can be found here. Once that was setup, I needed to create a new Github repo to push this project to. Being that I was already signed into Github, I navigated to https://github.com/new. There are a few options when setting up a new repo, but I was fine just entering the new repo name and keeping it public. The Phoenix generator already created a README and .gitignore file, and if I decide I want a license I can add it later. Once the repo was created, Github provided instructions on how to link this new repo with the newly created project, I think this documentation is a bit more verbose in what needs to be done and why. Following those instructions, all of my Phoenix-generated files are in my newly created repo.

There isn't a ton to see, but this is what my repo looks after completing the goals of this post.

Closing thoughts

Now, I know it might seem to be a bit lazy to write an entire post about how I started my new project and basically rely on the language and service's documentation. But this particular documentation is so good and detailed, I don't see much benefit in me just rewriting it. And, if there's one piece of advice I would give a new engineer, it's that he or she should get comfortable reading and implementing from documentation. The next few parts of this project will be less out of the box, influenced by multiple sources of inspiration, and have more written guidance.

References


This post is part of an ongoing series. I encourage any critique, feedback, or suggestions in the comments.

Top comments (0)