background preloader

Creating a Single Page Todo App with Node and Angular

Creating a Single Page Todo App with Node and Angular
Today we will be creating a very simple Todo application using the MEAN (Mongo, Express, Angular, Node) stack. We will be creating: Single page application to create and finish todosStoring todos in a MongoDB using MongooseUsing the Express frameworkCreating a RESTful Node APIUsing Angular for the frontend and to access the API While the application is simple and beginner to intermediate level in its own right, the concepts here can apply to much more advanced apps. The biggest things we should focus on is using Node as an API and Angular as the frontend. Making them work together can be a bit confusing so this tutorial should help alleviate some confusion. What We’ll Be Building Base Setup File Structure We are going to keep the file structure very simple and put most of the code for our Node application into the server.js file. - public ----- core.js ----- index.html - package.json - server.js Installing Modules In Node, the package.json file holds the configuration for our app. Todo Model

Getting started Bootstrap (currently v3.3.6) has a few easy ways to quickly get started, each one appealing to a different skill level and use case. Read through to see what suits your particular needs. Bootstrap Compiled and minified CSS, JavaScript, and fonts. Download Bootstrap Source code Source Less, JavaScript, and font files, along with our docs. Download source Bootstrap CDN The folks over at MaxCDN graciously provide CDN support for Bootstrap's CSS and JavaScript. Install with Bower You can also install and manage Bootstrap's Less, CSS, JavaScript, and fonts using Bower: $ bower install bootstrap Install with npm You can also install Bootstrap using npm: $ npm install bootstrap require('bootstrap') will load all of Bootstrap's jQuery plugins onto the jQuery object. Bootstrap's package.json contains some additional metadata under the following keys: Install with Composer You can also install and manage Bootstrap's Less, CSS, JavaScript, and fonts using Composer: $ composer require twbs/bootstrap <! Grids Navbar

Initializr - Start an HTML5 Boilerplate project in 15 seconds! 10 Easy Steps to a Complete Understanding of SQL Too many programmers think SQL is a bit of a beast. It is one of the few declarative languages out there, and as such, behaves in an entirely different way from imperative, object-oriented, or even functional languages (although, some say that SQL is also somewhat functional). I'm writing SQL every day and embracing SQL with my Open Source Software jOOQ. I thus feel compelled to bring the beauty of SQL a bit closer to those of you still struggling with it. The following tutorial is destined for readers who have already worked with SQL but never completely understood itreaders who know SQL well but have never really thought about its syntaxreaders who want to teach SQL to others This tutorial will focus on SELECT statements only. 1. Get this into your head first. SELECT first_name, last_name FROM employees WHERE salary > 100000 Easy to understand. What do we learn from this? So if this is so simple, what's the problem? Forget about all that. 2. There are three things to note: 3. FROM a, b 4.

Which Custom Web Fonts Solution Should You Use? Over the past few years the number of fonts available for use in web design has dramatically increased. It wasn’t long ago that we all knew not to stray further than the basic Arial, Helvetica, Times, Georgia mix, but now there’s a range of services that allow the use of almost any font imaginable in your website design. This post rounds up the various custom web font solutions and looks at the pros and cons of each. The most basic solution out of the lot is the CSS3 @font-face property. Pros: Powered by CSS. Cons: Limited to open source fonts Links: Since Google launched its Google Web Fonts API the service has grown to include hundreds of freely available fonts for use in your designs. Powered by CSS. Choice is limited to a range of free fonts For those needing professional or classic fonts in their designs for corporate branding, Typekit is definitely the best solution. Premium service with a yearly fee Good cross browser supportCharacter set can be limited for a smaller file size

Game Programming Patterns Grunt Bower Free Meta Tag Generator Position y Float El valor predeterminado para todos los elementos es position:static, que posiciona al elemento según el lugar donde fue definido en el HTML. Por lo general no hay necesidad de definir position:static, a menos que querramos caerle encima a alguna regla anterior que haya modificado el posicionamiento. Si le definimos position:relative a un elemento, entonces podemos utilizar top, bottom, left y right para mover el elemento con relación a la posición en la que aparecería normalmente en el documento. Movamos el div-1 20 pixeles hacia abajo y 40 pixeles hacia la izquierda: Fíjate que en el lugar donde hubiese aparecido el div-1 ahora hay un espacio en blanco. Parecería que position:relative no es muy útil, pero tendrá una tarea muy importante más adelante. Cuando utilizamos position:absolute, el elemento es removido del documento y colocado exactamente donde nosotros queremos. Movamos el div-1a a la esquina superior derecha de la página: Un momento, ¿qué sucedió con los demás elementos?

DomainTools Initializr: With Great Templates Comes Great Responsivity! | @verekia's blog Today I'm proud to announce that a "Responsive template" is now available on Initializr! It will help you dealing with all the various devices used to display your site. Mobiles, tablets, netbooks, laptops, desktop monitors, HUGE desktop monitors... Making your site work correctly on all these devices is a real nightmare. Well guess what? This nightmare is... absolutely not over! About responsive web design For those who have been living in a cave for the last few months (understand: for those who have a life and don’t spend days reading tweets and blogs) you probably need a short update about what a "responsive" design is. To design a responsive layout, we have to forget about the usual static 960px width layouts and go fluid with percentage widths and media queries. A fluid layout with percentage widths The first thing our page needs is a "fluid" layout. Mobile-first approach media queries The mobile view Here is the very simple mobile display of the responsive template. The wide view

Less: CSS Pre-Processor Sass: CSS Pre-Processsor Before you can use Sass, you need to set it up on your project. If you want to just browse here, go ahead, but we recommend you go install Sass first. Go here if you want to learn how to get everything set up. PreprocessingPreprocessing permalink CSS on its own can be fun, but stylesheets are getting larger, more complex, and harder to maintain. Once you start tinkering with Sass, it will take your preprocessed Sass file and save it as a normal CSS file that you can use in your website. The most direct way to make this happen is in your terminal. You can also watch individual files or directories with the --watch flag. sass --watch input.scss output.css You can watch and output to directories by using folder paths as your input and output, and separating them with a colon. sass --watch app/sass:public/stylesheets Sass would watch all files in the app/sass folder for changes, and compile CSS to the public/stylesheets folder. 💡 Fun fact: Sass has two syntaxes! VariablesVariables permalink

Sassaparilla: Sass & Compass Grid System

Related: